繁体   English   中英

如何将自定义属性添加到我的 Azure AD 租户成员(非 B2C 用户)

[英]How can i add Custom Attributes to my Azure AD tenant members (Not B2C users)

我有一个 Azure AD 租户,我正在寻找一种在我的组织内创建成员时包含额外属性的方法。 我已经浏览了界面,但在 Azure 门户上找不到实现此目的的方法。 根据我的发现,我可以看到有关如何使用 B2C 功能实现此目的的大量文档和博客文章,并为外部客户绘制 API 图表。 但是,这不符合我的要求。

我相信这是 Azure AD 上应该可以实现的基本要求。 有人可以指点我正确的文档来实现这一点吗?

Azure 门户不提供此类功能,但我们可以使用 Microsoft Graph API 进行存档: 创建 extensionProperty

您需要将targetObjects指定为“用户”。

一个示例(您可以将任何应用注册用于{object id of the app registration} ):

Post https://graph.microsoft.com/v1.0/applications/{object id of the app registration}/extensionProperties

{"name":"customAttribute","dataType":"string","targetObjects":["User"]}

它将生成一个名为extension_{client id of the app registration without "-"}_customAttribute

然后您可以更新用户的扩展属性:

Patch https://graph.microsoft.com/v1.0/users/{user id}

{"extension_{client id of the Azure AD application without "-"}_customAttribute":"value"}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM