可以在Azure ad Roleassignement的列表中查找ServicePrincipal

发布于 2025-02-10 13:56:46 字数 642 浏览 1 评论 0 原文

我正在尝试获取图形API的所有Azure广告角色成员的列表。具有该角色的用户和团体将正确显示。但是也应该有一个职位的服务主体,但我找不到图形API。有人知道为什么&也许也如何获得ServicePrincipal?

我测试了两个端点选项: https://graph.microsoft.microsoft.com/v1.0/directoryroles /{id}/成员

Azure Portal中的设置:

I'm trying to get a List of all Members of an Azure AD Role with the Graph API. Users and Groups with that Role are displayed properly. But there should be a Service Principal with that Role as well, but i can't find it with the Graph API. Does anyone know why & maybe how to get the Serviceprincipal as well?

I tested both Endpoint-options:
https://graph.microsoft.com/v1.0/directoryRoles/{ID}/members
https://graph.microsoft.com/v1.0/directoryRoles/roleTemplateId={ID}/members"

The Setup in Azure Portal:

The role in Azure AD

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你没皮卡萌 2025-02-17 13:56:46

要获得该角色的服务主体,您可以使用以下 Graph api 查询:

GET  https://graph.microsoft.com/v1.0/servicePrincipals/your service_principal_id/appRoleAssignedTo

确保在运行查询之前具有以下权限:

”“在此处输入图像说明”

注意:在您运行上述查询时,仅显示主动分配。

要详细了解更多信息,您可以参考本文为服务主体授予的列表AmploeSignments -Microsoft Graph V1.0

To get the service principal with that role you can make use of below Graph Api query:

GET  https://graph.microsoft.com/v1.0/servicePrincipals/your service_principal_id/appRoleAssignedTo

Make sure to have below permissions before running the query :

enter image description here

Note: That only active assignments will be displayed in response when you ran the above query.

To know more in detail, you can refer this article List appRoleAssignments granted for a service principal - Microsoft Graph v1.0 .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文