OIDC userinfo endpoint does not give name, family_name or given_name

Chris Lenz 0 Reputation points
2023-07-07T16:38:19.13+00:00

I have 2 Microsoft accounts, a personal one and one for my company.
When I log into an application that uses Microsoft oidc provider, I see the my name only for one of the accounts.

What I am missing?

My profile is set correct.

Any help appreciated.

https://learn.microsoft.com/en-gb/azure/active-directory/develop/userinfo?WT.mc_id=Portal-Microsoft_Azure_Support#calling-the-userinfo-endpoint

    "name": "Mikah Ollenburg", // all names require the “profile” scope.
    "family_name": " Ollenburg",
    "given_name": "Mikah",
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Marilee Turscak-MSFT 37,206 Reputation points Microsoft Employee Moderator
    2023-07-11T23:49:24.9366667+00:00

    Hi @Chris Lenz ,

    Make sure that the claims are added in the optional_claims and that they are added in the accessToken and that the profile scope is added to the request as described here. Note that the family_name and given_name claims are always included in v1.0 Azure AD tokens, but not included in v2.0 tokens unless requested. Typically this issue occurs if the scope is missing or the claims are not included.

    If you check the browser console you can also see if there is any policy that could be blocking the request.

    If the information helped you, please Accept the answer. This will help us as well as others in the community who may be researching similar questions.


Your answer

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