Azure B2C Userinfo Endpoint 401 Error

RPD 0 Reputation points
2023-10-14T18:18:04.6833333+00:00

When passing an ID token or access token to the Azure B2C userinfo endpoint, a 401 error is thrown. I followed the steps in the userinfo article and created a custom policy using this sample. I registered a web application and created a Userinfo endpoint with the custom policy. When I pass the AccessToken from the web application to the userinfo endpoint, it fails with a 401 error. However, when I run the custom userinfo policy with the web application Id in the Azure Portal, I get the ID token, and this token works with the userinfo endpoint. If I generate a token with a different user flow with the web application Id and pass it to the userinfo endpoint, it throws a 401 error. Am I missing something here?

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
Microsoft Security | Microsoft Entra | Other

1 answer

Sort by: Oldest
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.