【发布时间】:2023-03-06 08:10:01
【问题描述】:
是否可以通过 API 将用户/成员添加到 Exchange 管理员角色组?等效的 PowerShell cmdlet 是 Add-RoleGroupMember,我希望添加到的特定组是 View-only Organization Management。
Microsoft Graph 有一个到 add to directory roles 的端点,但是我似乎找不到在我的租户的 DirectoryRoles 或 DirectoryRoleTemplates 中列出的“仅查看组织管理”组,所以我怀疑 MS Graph 无法访问这些交换角色组。对 Outlook API 的探索也没有以用户/成员函数的形式显示太多。
进一步探索添加的额外信息
我运行了这个 PowerShell cmdlet:
Add-RoleGroupMember -身份“View-only Organization Management” -成员“user@domain.onmicrosoft.com”
然后跑:
Get-RoleGroupMember -identity "仅查看组织管理"
确认用户确实已添加到其中。然后我运行了以下 MS Graph 调用:
获取https://graph.microsoft.com/v1.0/users/user@domain.onmicrosoft.com/memberOf
它返回了 zip:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryObjects",
"value": []
}
所以看起来这个特定的 View-only Organization Management 角色组无法通过 MS Graph 访问?是否有任何其他 API 可以让我添加到此角色组?
【问题讨论】:
标签: outlook office365 microsoft-graph-api azure-ad-graph-api outlook-api