microsoft / TemplateStudio

Template Studio accelerates the creation of new WinUI 3, WPF, and UWP apps using a wizard-based experience.
Other
2.7k stars 461 forks source link

Services Login Issues #4462

Open kalirajanganeshan opened 2 years ago

kalirajanganeshan commented 2 years ago

Describe the bug

I have created the WPF Template studio project with forced login. I have registered that application using the following reference document.

https://github.com/Azure-Samples/active-directory-dotnet-desktop-msgraph-v2

I have registered that client ID in my project but while running that I have faced the following issue. Could you please suggest solution to get rid of this issue?

image

I have gave the following URL as redirected URI.

https://login.microsoftonline.com/common/oauth2/nativeclient.

To Reproduce

  1. Create the WPF project using WPF Template Studio with forced login option
  2. Then registered that application in Azure Active directory.
  3. Replace the registered client id in project appsettings.json file
  4. Then run the project and login

Additional context

No response

Applies to the following platforms:

About your setup

mikebattista commented 2 years ago

I believe you need to add http://localhost to the list of supported redirectUris for your application in Azure. Could you try that?

kalirajanganeshan commented 2 years ago

Hi mikebattista,

We have try to register wpf application so that how can we get the http://localhost redirct URI. We give following URI as redirected URI by following microsoft help document.

Redirect URI : https://login.microsoftonline.com/common/oauth2/nativeclient.

Microsoft Help Document: https://github.com/Azure-Samples/active-directory-dotnet-desktop-msgraph-v2