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

[Bug] Using userFlow parameter for both AuthorizeForScopes and GetAccessTokenForUserAsync results in AADB2C90088 #837

Closed
jennyf19 opened this issue Dec 12, 2020 · 2 comments

Comments

@jennyf19
Copy link
Collaborator

from: @grzegorzy -

Cannot acquire API access token for B2C Reset Password policy. I used the userFlow parameter for both AuthorizeForScopes and GetAccessTokenForUserAsync but when I sign in via the "reset password" policy I receive an error when the application tries to call the TodoListService. Here is the error:

MSAL.NetCore.4.16.1.0.MsalUiRequiredException:
ErrorCode: invalid_grant
Microsoft.Identity.Client.MsalUiRequiredException: AADB2C90088: The provided grant has not been issued for this endpoint. Actual Value : B2C_1_TEST_susi and Expected Value : B2C_1_TEST_reset_password

My assumption after the 0.2.1-preview release and according to what @jennyf19 said here was that ToDoListClient should redirect me back to the B2C again after I use the "reset password" functionality, in order to acquire an access token for the correct policy "susi". I don't know if this is what should happen. Either way my case still doesn't work.

I tried to quickly check it in the source code and I noticed one thing. Take a look at the AuthorizeForScopes attribute implementation. It looks like the UserFlow property is not used in the OnException method. It might be a mistake or I just don't see something.

Perhaps I am doing something wrong. Perhaps I should create a separate issue instead of writing here. I just wanted to give you guys some feedback.

cc: @jmprieur

Looks like we missed this from this issue.

@jennyf19
Copy link
Collaborator Author

I need to check if this still repros.

@jennyf19
Copy link
Collaborator Author

Could be fixed in 2.5.0, if not, please re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant