简体   繁体   English

Azure AD B2C 自定义策略 - 动态绑定 MultiCheckbox

[英]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.我正在尝试在 azure ad b2c 自定义策略声明模式中使用动态值实现多复选框。

Url : https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-configure-signup-self-asserted-custom网址: 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?如何在策略 XML 中使用动态值而不是静态值绑定限制枚举? I am trying to bind a return value of rest API from user journey to MultiCheckBox.我正在尝试将用户旅程中的 rest API 的返回值绑定到 MultiCheckBox。

Answer回答

Use javascript to generate multicheck box.使用 javascript 生成多选框。 Use rest api call to get value(out put claim) that needs to be bind with multicheckbox.使用 rest api 调用来获取需要与 multicheckbox 绑定的值(输出声明)。 Pass out put claim value to custom html page (self assertion page) Use javascript to bind output claim and multicheckbox将 put 声明值传递到自定义 html 页面(自断言页面)使用 javascript 绑定输出声明和 multicheckbox

IEF does not support dynamic values for collections as of now. IEF 目前不支持集合的动态值。 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.一种替代方法是重定向到符合 OpenID Connect 的提供商并在那里显示这样的屏幕,并返回适当的声明。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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