Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1-5-B2C Returning 'Unauthorized_client' error #721

Closed
kenshinee opened this issue Jul 24, 2023 · 2 comments
Closed

1-5-B2C Returning 'Unauthorized_client' error #721

kenshinee opened this issue Jul 24, 2023 · 2 comments
Labels
question Further information is requested

Comments

@kenshinee
Copy link

Microsoft.Identity.Web version

2.13.0

Web app sign-in

1-WebApp-OIDC/1-5-B2C

Web API (call Graph or downstream APIs)

Not applicable

Deploy to Azure

Not applicable

Auth Z

Not applicable

Description

I configure a B2C and a Web App as described here https://learn.microsoft.com/en-us/azure/active-directory-b2c/configure-authentication-sample-web-app?tabs=visual-studio.

I backtracked a few times to make sure I am using the correct setting. However, when I run the web app, it loads. After selecting "Sing Up/In" or "Claims" on the menu, it shows the following error "Message contains error: 'unauthorized_client', error_description: 'AADB2C90057: The provided application is not configured to allow the 'OAuth' Implicit flow."

image

I must be missing out something which I couldn't get my head around.

Reproduction steps

  1. Configure B2C,
  2. Setup User Flows
  3. Register App as described https://learn.microsoft.com/en-us/azure/active-directory-b2c/configure-authentication-sample-web-app?tabs=visual-studio
  4. Configure Web App as described https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2
  5. Run the app
  6. Home page loads successfully. When select "Claim" or "sign In", error is returned.

Error message

"Message contains error: 'unauthorized_client', error_description: 'AADB2C90057: The provided application is not configured to allow the 'OAuth' Implicit flow."

Id Web logs

No response

Relevant code snippets

Solution 1-5-B2C

Regression

No response

Expected behavior

Redirect to B2C login

@kenshinee kenshinee added the question Further information is requested label Jul 24, 2023
@kenshinee
Copy link
Author

I resolved this be adding "Access Tokens" to the App's authentication. The setup mentioned this was not required. However, somehow switching it on resolved my problem.

image

@phenixita
Copy link

I have the same issue.

I don't know if it's "correct" to enable Access tokens.

I want only to sing-in users and I'd like to enable only ID tokens.

This setting is working fine if I register an application in Azure Active Directory "standard".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants