0

I found a lot number of examples how o do this. https://learn.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/hosted-with-azure-active-directory?view=aspnetcore-6.0 And it works fine when I run it locally in debug.

Everything is fine, until I want to publish the application up to an Azure APP Service.

  1. I create an App Service and connect the server registration to it
  2. I add on the client registration the URL of the APP Service https://xxxxx.azurewebsites.net/authentication/login-callback
  3. In Visual Studio 2022 I publish the server application up to the App Service

To my surprise, the application does not work from the published site...

I get the response:

Sign in
Sorry, but we’re having trouble signing you in.

AADSTS700054: response_type 'id_token' is not enabled for the application.

I can not find an example that go all the way to a published APP service...

So what is wrong in my thinking here?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Mr T
  • 1

1 Answers1

1

You need to register the app in Azure AD.

Your error message is: "'id_token' is not enabled for the application"

To fix this under Advanced Settings, Implicit grant check the box "ID tokens".

Shiraz Bhaiji
  • 64,065
  • 34
  • 143
  • 252
  • All already done that, as in the article on the client registration. – Mr T Feb 16 '22 at 07:50
  • Can you post a screenshot of your registration? – Shiraz Bhaiji Feb 16 '22 at 09:03
  • Sorry I was obviously not clear in my description. I have follow all steps in the link in from Microsoft. It works when I run it locally. Next step is to publish it to Azure. How do I make that happen? I just run publish in VS 2022 – Mr T Feb 16 '22 at 11:17