B2C Failing to get custom claim in custom policy

Vincent Nyanga 26 Reputation points
2022-03-30T11:44:31.49+00:00

I created a custom claim in the portal and I'm creating users with that claim using the Graph API. If I use the user flow to login I manage to get the custom claim. However if I use a custom policy I don't get the custom claim. I don't know what I'm doing wrong. If I declare it as an output claim in my RP I get a 500 - internal server error. If I declare the custom claim (which doesn't make sense since I already declared it using the UI earlier) I get back nothing or the default value if I specify it in the PR.

I would have used the user flow process since it works but I need to perform extra logic so I have to use custom policies.

Thank you for your assistance.

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,875 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vincent Nyanga 26 Reputation points
    2022-03-30T12:31:44.287+00:00

    I managed to solve the issue. I added the following in my AAD-Common
    <Metadata>
    <Item Key="ApplicationObjectId">B2C extension app object ID</Item>
    <Item Key="ClientId">B2C extension app client ID/Item>
    </Metadata>

    1 person found this answer helpful.

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.