Here’s the idea, you want your UWP user to login with their MSA so you can get their information, access OneDrive, Outlook, Office, Rome devices or just their profile photo and name. Whatever the reason, it’s more simple than you think.
Please note: the Live SDK we used to use for this has been deprecated and now we use Microsoft Graph for just about everything around authentication & access.
Here are your four easy steps to follow:
- Register your app @ http://apps.dev.microsoft.com
- Add your ClientID & ReturnURL to app.xaml Resources
- Copy AuthenticationHelper.cs
- Nuget packages
- PM> Install-Package Microsoft.Graph
- PM> Install-Package Microsoft.Identity.Client –pre