简体   繁体   中英

Azure AD B2C Custom Policy - Bind MultiCheckbox dynamically

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM