图形API URL将成员添加到Azure Active Directory安全组中 [英] Graph api url to add members into azure active directory security group

查看:99
本文介绍了图形API URL将成员添加到Azure Active Directory安全组中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个可以在邮递员中使用的Graph api网址,以将成员添加到现有的Azure动态目录安全组中

I need a Graph api url that can be used in postman to add member into existing azure active directory security group

推荐答案

可以将成员添加到现有的Azure活动目录安全组中的Graph api网址是

The Graph api url that can add member into existing azure active directory security group is

POST https://graph.microsoft.com/v1.0/groups/{id}/members/$ref
Content-type: application/json
Content-length: 30

{
  "@odata.id": "https://graph.microsoft.com/v1.0/directoryObjects/{id}"
}

请参考

Refer to this for more details.

要调用图形api,您需要首先获取访问令牌.这是获取访问令牌的两种方法.

To call graph api, you need to get an access token first. Here are two ways to get the access token.

1.客户凭证流

2.授权代码流

https://blogs.msdn.microsoft.com/aaddevsup/2018/05/23/using-postman-to-call-the-microsoft-graph-api-using-authorization-代码流/

注意:客户端凭据流需要应用程序权限,授权代码流需要委派权限.

Note: Client Credentials Flow needs Application permission, Authorization Code Flow needs Delegated permission.

更新: 此api也适用于安全组.我已成功将用户添加到安全组.

Update: This api also works for security group. I have added a user to the security group successfully.

这篇关于图形API URL将成员添加到Azure Active Directory安全组中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆