我们正在实施 Microsoft 365 的新代词功能,我们需要能够将此用户提供的数据同步回我们的 Active Directory 环境。根据 admin 文档,这些代词“与其他数据一起存储在用户的 Exchange 邮箱中。”
但是,当我使用
Get-Mailbox
(使用ExchangeOnlineManagement
模块,版本3.2.0 Preview2
)时,我在任何地方都看不到代词数据(使用Get-Mailbox [email protected] | Select *
)。
我找不到与此功能相关的任何 PowerShell 文档。任何人都可以:
提前感谢您给我的任何建议!
我发现代词是通过 POST 请求从
https://nam.loki.delve.office.com/api/v2/extendeduserinfo/pronouns
中检索到的。不确定 URL 的 nam
或 loki
部分是静态的还是特定于我们的租户。
不幸的是,Delve 应用程序的这一部分似乎没有通过 Graph API 公开(至少现在还没有)。所以,我最终为我们公司创建了一个内部应用程序,它遍历每个用户并执行以下操作:
loki.delve.office.com
结尾的密钥,并使用密钥ConvertGetPost=true
aadObjectId=<oid>
(将 <oid>
替换为目标 Azure AD 用户的对象 ID{
"accept": "application/json",
"Content-Type": "application/json",
"authorization": "<token that was retrieved above>"
# these next two are required, will throw a 500 error without them
"X-ClientType": "MicrosoftTeamsAngular",
"X-HostAppRing": "general",
}
{
"id": "<oid of the target Azure AD user>",
# note that the preceding space is not a typo
"displayName": " He/Him",
"allowedAudiences": "Organization"
}
然后将这些属性分配给其他应用程序可以使用的自定义字段中的用户。
不确定我们是否能够开源该工具,但如果不能,希望以上内容能够为其他人指明正确的方向。