我有一个应用程序需要根据其本地AD公用名过滤权限。票据夫妇:Azure AD - 检索一个On-Prem AD组公用名称
- Azure的AD连接被OnPrem AD和Azure的
- 之间同步数据,我成功地检索登录从Azure的图形API用户的群组信息到Web应用程序。
我遇到的问题是从Graph API返回的数据不是我所需要的,或者我没有正确配置Azure AD Connect。有关组的Graph API JSON返回对象的文档记录在here中。
下面是从图形API返回的组对象:
{
"odata.metadata": "https://graph.windows.net/myorganization/$metadata#directoryObjects/Microsoft.DirectoryServices.Group/@Element",
"odata.type": "Microsoft.DirectoryServices.Group",
"objectType": "Group",
"objectId": "b4bda672-1fba-4711-8fb1-5383c40b2c14",
"deletionTimestamp": null,
"description": "Marketing Department",
"dirSyncEnabled": null,
"displayName": "Marketing",
"lastDirSyncTime": null,
"mail": null,
"mailNickname": "BposMailNickName",
"mailEnabled": false,
"onPremisesSecurityIdentifier": null,
"provisioningErrors": [],
"proxyAddresses": [],
"securityEnabled": true
}
我能找到最接近的是“显示名称”,但是这不是通用名称。一个我不想使用的选项是使所有“显示名称”与组CN相同。
TLDR; 是否可以通过Graph API访问用户组CN,如果可以,我如何获取这些数据?
更新:我使用图形API端点getObjectsByObjectIds命中图形API一旦我检索到所有用户组ID。
感谢丹的信息。我们将更新授权过滤器,以便我们使用SID/onPremisesSecurityIdentifier属性。 – user959729