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 Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,672 questions
Microsoft Entra
{count} votes