0

I am working on an ADB2C Signup Custom Policy. There are some fields/user attributes which I want to prefill based on the values passed in url using some query parameter or so. I have tried {OAUTH-KV:query_parameter} claim resolver mentioned in the following link: https://learn.microsoft.com/en-us/azure/active-directory-b2c/claim-resolver-overview#using-claim-resolvers but was not able to achieve this. Any suggestion/solution will be really helpful.Thanks in Advance.

1 Answers1

0

This will depend largely on the type of Technical Profile, but there are two things I would recommend checking in your implementation.

First, you need to make sure that you are setting the DefaultValue attribute, and setting AlwaysUseDefaultValue to true. Here is a working example from a Self Asserted technical profile.

<InputClaims>
  <InputClaim ClaimTypeReferenceId="email" DefaultValue="{OAUTH-KV:userEmailParameter}" AlwaysUseDefaultValue="true"/>
</InputClaims>
<OutputClaims>
   <OutputClaim ClaimTypeReferenceId="email" Required="true"/>
   <OutputClaim ClaimTypeReferenceId="password" Required="true"/>
</OutputClaims>

Second, on some technical profiles, you must have the IncludeClaimResolvingInClaimsHandling metadata attribute added and set to true.

<Metadata>
  <Item Key="IncludeClaimResolvingInClaimsHandling">true</Item>
</Metadata>

Feel free to edit your original post and include the technical profile you have configured, and I may be able to better help.

Brad C.
  • 564
  • 3
  • 5
  • Hello Brad, Thanks for the response. Actually I was using {OAUTH-KV} for an OutputClaim in the signup policy. I am not sure if that is possible. But I included the InputClaim for the same fields as well and used {OAUTH-KV} for that. And that solved my problem – Mohit Aggarwal Mar 04 '21 at 08:58