我正在尝试在自定义“ SignUpOrSignin.xml”策略上启用Javascript,因此我可以对“重置密码”和“注册”按钮执行自定义操作。
我在SignUpOrSignin.xml上执行了以下步骤:
<RelyingParty>
<DefaultUserJourney ReferenceId="SignUpOrSignIn" />
<UserJourneyBehaviors>
<ScriptExecution>Allow</ScriptExecution>
</UserJourneyBehaviors>
.........
.........
.........
</RelyingParty>
和在TrustFrameworkBase.xml上:
<ContentDefinition Id="api.signuporsignin">
<LoadUri>https://ttt.blob.core.windows.net/b2c-migration-users/pages/unified.html</LoadUri>
<RecoveryUri>~/common/default_page_error.html</RecoveryUri>
<DataUri>urn:com:microsoft:aad:b2c:elements:unifiedssp:1.1.0</DataUri>
<Metadata>
<Item Key="DisplayName">Signin and Signup</Item>
<Item Key="TemplateId">azureBlue</Item>
</Metadata>
</ContentDefinition>
不幸的是,当我尝试在AAD B2C实例中上载SignUpOrSignin.xml策略时,收到以下验证错误:
Validation failed: 1 validation error(s) found in policy "B2C_1A_JITMIGRAION_SIGNUP_SIGNIN" of tenant "mytenant.onmicrosoft.com". Please use page contract in content definitions when enabling JavaScript.
我想念什么?任何帮助将不胜感激!
对于要启用JS的任何ContentDefinition
,DataUri
必须为合约版本。这意味着需要将urn:com:microsoft:aad:b2c:elements:unifiedssp:1.1.0
更改为urn:com:microsoft:aad:b2c:elements:contract:unifiedssp:1.2.0
(请参阅Content Definitions Documentation)。页面布局版本也有所不同,您可以通过单击here来查看这些差异。