Azure ad b2c 如何查看由自定义策略创建的用户的数据?

Azure ad b2c 如何查看由自定义策略创建的用户的数据?,azure-ad-b2c,azure-ad-b2c-custom-policy,Azure Ad B2c,Azure Ad B2c Custom Policy,我有允许用户注册或登录的注册和登录自定义策略。它工作得很好 本保单使用以下声明: <OutputClaim ClaimTypeReferenceId="extension_firstName" /> <OutputClaim ClaimTypeReferenceId="extension_lastName" /> <OutputClaim ClaimTypeReferenceId="extension_organiz

我有允许用户注册或登录的注册和登录自定义策略。它工作得很好

本保单使用以下声明:

<OutputClaim ClaimTypeReferenceId="extension_firstName" />
<OutputClaim ClaimTypeReferenceId="extension_lastName" />
<OutputClaim ClaimTypeReferenceId="extension_organizationName" />
<OutputClaim ClaimTypeReferenceId="extension_contactPhoneNumber" />
<OutputClaim ClaimTypeReferenceId="extension_selectRole" />
<OutputClaim ClaimTypeReferenceId="extension_terms" />

当我转到B2C门户,找到用户并查看用户详细信息时,没有任何扩展声明(属性或属性)出现在那里

然后我使用Microsoft Graph,发出以下查询:

对象ID]

我为用户获取最少的数据。此处不显示任何扩展校准数据


如何查看由自定义策略创建的给定用户的所有扩展声明数据?

Azure门户不显示用户的扩展属性

对于Microsoft Graph查询,必须添加才能包含扩展属性,例如:

GET https://graph.microsoft.com/v1.0/users/{id}?$select=extension_{b2cExtensionsAppClientId}_firstName,extension_{b2cExtensionsAppClientId}_lastName,...
其中,
{b2cextensionsapplientid}
是[b2c扩展应用程序应用程序]的应用程序(客户端)标识符(不带连字符)(https://docs.microsoft.com/en-us/azure/active-directory-b2c/extensions-app)在Azure AD B2C租户中注册的,例如:

extension_b2ba52d57b074a5e8fa2d8b35f5a1347_firstName

使用Graph的beta端点。如果您不确定属性名称,也可以使用
/beta/users/id
,因为它似乎会返回所有属性名称。不过,这在将来可能会发生变化。感谢Chris和@juunas解决这个谜