Hello Gurpreet0101Singh-9444,
Yes, in Azure AD B2C custom policies:
- Based on a claim like
"trueidentity"
usingAssertStringClaimIsEqualToValue
transformation, you can control the flow conditionally. A custom error can be thrown to stop the flow if the value is"no"
. - Azure AD B2C cannot parse nested JSON arrays (such as
userconfig
) with only XML. Use a REST API claims provider to get these values; it decodes the JSON and provides flat claims (such asfirstName
andsurName
).
Hence, change the OIDC IdP to directly return flattened claims.
For sample: If OIDC provider returns the below:
"userconfig": [
{ "attribname": "first_name", "value": "John" },
{ "attribname": "sur_name", "value": "Doe" }
]
- Information like
firstName
andsurName
cannot be directly extracted by Azure AD B2C.
Hence the provider must return:
"first_name": "John",
"sur_name": "Doe"
By doing it, allows direct mapping in OutputClaims
section:
<OutputClaim ClaimTypeReferenceId="firstName" PartnerClaimType="first_name" />
<OutputClaim ClaimTypeReferenceId="surName" PartnerClaimType="sur_name" />
Hope this helps!
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful, which may help members with similar questions.
If you have any other questions or are still experiencing issues, feel free to ask in the "comments" section, and I'd be happy to help.