在RelyingParty Azure AD B2C自定义策略中覆盖ContentDefinition

时间:2017-11-07 20:09:30

标签: azure-ad-b2c

我可以覆盖RP政策中的<ContentDefinition><LoadUri>吗?

RP Policy.xml

<BasePolicy>
    <TenantId>mytenant.onmicrosoft.com</TenantId>
    <PolicyId>B2C_1A_TFExts</PolicyId>
</BasePolicy>
<BuildingBlocks>
    <ContentDefinitions>
      <ContentDefinition Id="api.idpselections-ext-local">
        <LoadUri>~/tenant/default/idpSelector.cshtml</LoadUri>
      </ContentDefinition>
    </ContentDefinitions>
</BuildingBlocks>

TFExts.xml

<BuildingBlocks>
    <ContentDefinitions>
        <ContentDefinition Id="api.idpselections-ext-local">
            <LoadUri>https://localhost:44377/</LoadUri>
            <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
            <DataUri>urn:com:microsoft:aad:b2c:elements:idpselection:1.0.0</DataUri>
            <Metadata>
                <Item Key="DisplayName">Idp selection page</Item>
                <Item Key="language.intro">Sign in</Item>
            </Metadata>
        </ContentDefinition>
    </ContentDefinitions>
</BuildingBlocks>

1 个答案:

答案 0 :(得分:1)

我覆盖了错误 ContentDefinition Id。所以是的,我可以在依赖方政策中覆盖<ContentDefinition><LoadUri>

<BuildingBlocks>
    <ContentDefinitions>
      <ContentDefinition Id="api.selfasserted-ext-local">
        <LoadUri>https://localhost:44377/</LoadUri>
      </ContentDefinition>
    </ContentDefinitions>
</BuildingBlocks>