在Azure AD B2C中登录电子邮件域验证

时间:2020-04-29 08:22:31

标签: azure azure-active-directory azure-ad-b2c

我正在使用this链接中显示的步骤使用Microsoft身份验证。

这将打开一个Microsoft SSO页面进行登录,该页面可以正常工作。这使我们可以通过不同的Microsoft托管电子邮件(例如your-email@hotmail.comyour-email@outlook.com等)登录。我现在要做的是添加一个验证以使电子邮件域绑定,例如仅允许{{1 }}用户登录。我们如何使用自定义策略执行此操作?

我们尝试添加以下this链接中建议的代码:

@outlook.com

但是无法上传此政策并出现此错误:

<ClaimsTransformation Id="GetDomainFromEmail" TransformationMethod="ParseDomain">
  <InputClaims>
    <InputClaim ClaimTypeReferenceId="email" TransformationClaimType="emailAddress" />
  </InputClaims>
  <OutputClaims>
    <OutputClaim ClaimTypeReferenceId="domain" TransformationClaimType="domain" />
  </OutputClaims>
</ClaimsTransformation>

<ClaimsTransformation Id="LookupDomain" TransformationMethod="LookupValue">
  <InputClaims>
    <InputClaim ClaimTypeReferenceId="domain" TransformationClaimType="inputParameterId" />
  </InputClaims>
  <InputParameters>
    <InputParameter Id="wintellect.com" DataType="string" Value="valid" />
    <InputParameter Id="microsoft.com" DataType="string" Value="valid" />
    <InputParameter Id="test.com" DataType="string" Value="valid" />
    <InputParameter Id="errorOnFailedLookup" DataType="boolean" Value="true" />
  </InputParameters>
  <OutputClaims>
    <OutputClaim ClaimTypeReferenceId="domainStatus" TransformationClaimType="outputClaim" />
  </OutputClaims>
</ClaimsTransformation>

我们将非常感谢您提供有关如何在Microsoft SSO中验证域的任何帮助。 谢谢。

编辑: 技术简介如下:

Validation failed: 1 validation error(s) found in policy "B2C_1A_SIGNUP_SIGNIN" of tenant "<yor-tenant-id>.onmicrosoft.com".Invalid technical profile with id "Common-AAD" only the protocol handler ""Web.TPEngine.Providers.SelfAssertedAttributeProvider"" can have a ValidationTechnicalProfile.Invalid technical profile with id "Common-AAD" only the protocol handler ""Web.TPEngine.Providers.SelfAssertedAttributeProvider"" can have a ValidationTechnicalProfile.

0 个答案:

没有答案