使用Microsoft Graph API更新Azure AD中的角色应用程序用户

发布于 2025-01-31 02:32:01 字数 578 浏览 4 评论 0 原文

我在一个名为Power的应用程序中有不同的角色。

在此处输入图像描述

每个用户都有一个角色,我希望能够更改角色使用Graph Explorer给使用Graph API的用户并将其连接到Power Apps。

在此处输入图像描述

​.microsoft.com/v1.0/%7BID%7D/用户?$ explion = ApploEassignments“ rel =“ nofollow noreferrer”> https://graph.microsoft.com/v1.0/ {id}/users?$ explign = AmploEassignments

如果有另一个API或连接器,我可以使用它并将其与PowerApps连接起来,它也对我有用。

I have different roles of an app called power.

enter image description here

Each user has a role assigned and I want to be able to change a role to a user with graph api using graph explorer and connect it to power apps.

enter image description here

enter image description here

With this request i have the id role of all users but I don't know how to update them

GET https://graph.microsoft.com/v1.0/{id}/users?$expand=appRoleAssignments

If there is another api or connector with which I can do it and connect it with powerapps, it also works for me.

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

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

发布评论

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

评论(1

木森分化 2025-02-07 02:32:01

是的,您应该在下面发送请求(授予服务校长的AmploAseSignment

endpoint

https://graph.microsoft.com/v1.0/serviceprincipals/ {appObjectId}/apploleassignedto

{appObjectID} 应该是 eNTERPRISE应用程序(服务principal)对象ID

方法

post post

请求标头

Content-type: application/json

请求body

{
    "principalId": "",
    "resourceId": "",
    "appRoleId": ""
}

principalid = user/group对象id

resourced = eNTERPRISE Application 对象ID,这是端点 {appObjectID}

exploleid = app cool ID中使用的ID相同的ID,可以在中找到它应用注册清单

Yes, you should be sending a request as below (from Grant an appRoleAssignment for a service principal)

Endpoint

https://graph.microsoft.com/v1.0/servicePrincipals/{appObjectId}/appRoleAssignedTo

{appObjectId} should be the Enterprise Application (service principal) object ID

Method

POST

Request headers

Content-type: application/json

Request Body

{
    "principalId": "",
    "resourceId": "",
    "appRoleId": ""
}

principalId = The user/group object ID

resourceId = The Enterprise Application object ID, which is the same ID used in the endpoint {appObjectId}

appRoleId = The app role ID, which can be found in the App Registration manifest

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