The Dynamics CRM SDK has a login control that you can use in your client applications. Let’s go through an example of how to use this.
Open Visual Studio and create a new project. Go to CRM SDK Templates and select WPF Application for CRM with .NET Framework 4.5.2 selected:
You will see something like this:
Press F5 to run the application. You will see this window:
Clicking Login to CRM will open the login window:
Enter details to log into CRM.
The code is contained in the XAML file: