B2C Failing to get custom claim in custom policy

Vincent Nyanga 26 Reputation points

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

1 answer

Sort by: Most helpful
  1. Vincent Nyanga 26 Reputation points

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

    1 person found this answer helpful.