Azure ad b2c 使用strongAuthenticationEmailAddress检索用户时出错

Azure ad b2c 使用strongAuthenticationEmailAddress检索用户时出错,azure-ad-b2c,Azure Ad B2c,在我的自定义策略中,我正试图使用以下示例(TrustFrameworkExtensions.xml中的第135行)中所述的strongAuthenticationEmailAddress属性从目录检索用户,但这似乎没有按预期工作 阅读 假的 在检查AppInsights中的跟踪后,我发现了以下错误 “异常”:{“种类”:“已处理”,“HResult”:“80131500”,“消息”:“在租户“XXX”中使用标识符声明类型“strongAuthenticationEmailAddress”检

在我的自定义策略中,我正试图使用以下示例(TrustFrameworkExtensions.xml中的第135行)中所述的strongAuthenticationEmailAddress属性从目录检索用户,但这似乎没有按预期工作


阅读
假的
在检查AppInsights中的跟踪后,我发现了以下错误

“异常”:{“种类”:“已处理”,“HResult”:“80131500”,“消息”:“在租户“XXX”中使用标识符声明类型“strongAuthenticationEmailAddress”检索用户时出错。返回的错误为400/请求\u不受支持查询:属性“strongAuthenticationEmailAddress”不作为声明的属性或扩展属性存在。”


我是否遗漏了需要执行的操作?

您只能通过objectId、signInNames或alternativeSecurityId读取用户。这是Microsoft Graph API的接口,受其支持通过唯一标识符检索帐户的限制。StrongAuthEmail不是唯一标识符。

看起来像ample对此表示反对,因此将与创建者再次核实。谢谢Jas,我将等待澄清。要求确保所有帐户的电子邮件地址都是唯一的-例如,防止有人注册本地帐户,然后与使用相同电子邮件地址的社交idp注册。是否有其他方法可以做到这一点完全在自定义策略中实现?是的,您将根据此要求将电子邮件存储在signInNames集合中,并且交叉检查将针对signInNames而不是strongAuthEmail。我现在有一个使用signInNames集合的工作解决方案,非常感谢您提供的信息。
<TechnicalProfile Id="AAD-UserReadUsingExternalIdpEmailAddress">
          <Metadata>
            <Item Key="Operation">Read</Item>
            <Item Key="RaiseErrorIfClaimsPrincipalDoesNotExist">false</Item>
          </Metadata>
          <InputClaims>
            <InputClaim ClaimTypeReferenceId="email" PartnerClaimType="strongAuthenticationEmailAddress" Required="true" />
          </InputClaims>
          <OutputClaims>
            <OutputClaim ClaimTypeReferenceId="tempObjectId" PartnerClaimType="objectId"/>
          </OutputClaims>
          <IncludeTechnicalProfile ReferenceId="AAD-Common" />
        </TechnicalProfile>