Azure-Samples / active-directory-dotnet-desktop-msgraph-v2

Sample showing how a Windows desktop .NET (WPF) application can get an access token using MSAL.NET and call the Microsoft Graph API or other APIs protected by the Microsoft identity platform (Azure Active Directory v2)
https://aka.ms/aadv2
MIT License
146 stars 99 forks source link

Replace the redirect URI by https://login.microsoftonline.com/common/oauth2/nativeclient #36

Closed jmprieur closed 4 years ago

jmprieur commented 4 years ago

Why? Public client application should not use urn:ietf:wg:oauth:2.0:oob but https://login.microsoftonline.com/common/oauth2/nativeclient

What needs to be done?

  1. Create a new app to use the https://login.microsoftonline.com/common/oauth2/nativeclient redirect URI
  2. Change the code of the sample to use .WithDefaultRedirectUri
  3. Change the apps.json and the sample.json to specify https://login.microsoftonline.com/common/oauth2/nativeclient
  4. Update the text of the quickstart article (see (https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-v2-windows-desktop)
  5. Use 2 branches (for the download zip file) until the portal reflects the new version of the quickstart.
jmprieur commented 4 years ago

See also https://github.com/Azure-Samples/active-directory-dotnet-desktop-msgraph-v2/pull/22/files, but we still need to create a new app.