4
votes

I am trying to implement multicheckbox with dynamic values in azure ad b2c custom policy claims schema.

Url : https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-configure-signup-self-asserted-custom

Example:

   <ClaimType Id="city">
  <DisplayName>Receive updates from which cities?</DisplayName>
  <DataType>string</DataType>
  <UserInputType>CheckboxMultiSelect</UserInputType>
  <Restriction>
    <Enumeration Text="Bellevue" Value="bellevue" SelectByDefault="false" />
    <Enumeration Text="Redmond" Value="redmond" SelectByDefault="false" />
    <Enumeration Text="Kirkland" Value="kirkland" SelectByDefault="false" />
  </Restriction>
    </ClaimType>

How to bind Restriction Enumerations with dynamic values rather than static values in policy XML? I am trying to bind a return value of rest API from user journey to MultiCheckBox.

Answer

Use javascript to generate multicheck box. Use rest api call to get value(out put claim) that needs to be bind with multicheckbox. Pass out put claim value to custom html page (self assertion page) Use javascript to bind output claim and multicheckbox

1
How well does this solution work? How exactly do you pass the possible values to the custom page and Javascript? - sgdesmet

1 Answers

3
votes

IEF does not support dynamic values for collections as of now. This is an interesting scenario though.

One alternate could be to redirect to an OpenID Connect compliant provider and show such a screen there, and return appropriate claims.