Azure B2C Userinfo Endpoint return a Boolean

DisplayName-3010 101 Reputation points


I am using a userinfo endpoint. If you return a claim of type boolean in the id_token if is correctly marked as a boolean in the token.
If you are using the uerinfo endpoint and create a json there, if is returned as a string with value "False" or "True". Is there a possibility to configure this, or is this a bug or non-implemented feature in the current solution?

Example Userinfo:
"sub": "********",
"email": "someemail@tiedtlaw email .com",
"locale": "de",
"extension_residency": "False"

Example Token

"typ": "JWT",
"alg": "RS256",
"kid": "****"
"exp": 1651119806,
"nbf": 1651033406,
"ver": "1.0",
"iss": "****",
"sub": "*",
"aud": "****",
"acr": "****",
"nonce": "defaultNonce",
"iat": 1651033406,
"auth_time": 1651033406,
"locales": "de",
**extension_residency": false


Azure Active Directory External Identities
0 comments No comments
{count} votes

Accepted answer
  1. AmanpreetSingh-MSFT 55,551 Reputation points

    Hi @DisplayName-3010 • Thank you for reaching out.

    Unfortunately, as of now, you cannot configure how it should be returned as a response to calling the UserInfo endpoint. So, it is not a bug but a non-implemented feature. You can post an idea regarding this at the Azure Feedback portal.

    The UserInfo endpoint is designed to return the boolean attributes as either true or false, depending on the default value configured for the attribute in the custom policy.

    For example, if the value of the boolean attribute (extension_boolval in this case) in the token is false but the RP (signup/sign-in) file is configured with the DefaultValue for this attribute as true, the UserInfo endpoint will return the value as True.

    1. Value of the boolean attribute in the Token:
    2. Configuration in the signup/signin xml file:
    3. Response from UserInfo endpoint:


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

0 additional answers

Sort by: Most helpful