Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure AD B2C Login Problems

Tags:

azure-ad-b2c

I am trying out the sample code on GitHub called active-directory-b2c-dotnet-webapp-and-webapi and when I run it against the AD B2C directory in the sample it works fine but I'm having an issue trying it out against my own AD B2C directory. I get the following error:

The application with ID 'xxx' cannot get an ID token either because the openid scope was not requested or the application is not authorized for it

Isn't the openid scope included automatically? I setup a Web App and a Web API app as per the instructions provided. When I look at the scopes that the Web App has access to, the openid scope is not listed there. Is this something I need to add manually?

like image 626
Peter Zanutto Avatar asked Sep 01 '25 04:09

Peter Zanutto


1 Answers

When we change the API permission for an app, the openid permission gets overwritten. We can re-enable it if this happens. The option will be available at API Permissions blade under https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade.

Open the API Permissions at the above link, Add a Permission, Select Microsoft Graph --> Select Openid and save. There you are! :)

like image 60
Sreepriya Sreekumar Avatar answered Sep 04 '25 22:09

Sreepriya Sreekumar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!