简体   繁体   English

如何在Azure Active Directory Graph API中创建具有指定目录角色的用户(工作帐户)

[英]How to create a user (work account) with specified directory role in Azure Active Directory Graph API

I'm trying to find out a way to create a User (work account) with specified DirectoryRole in Azure Active Directory Graph API using one Azure AD Graph API call. 我正在尝试找到一种方法,可以使用一个Azure AD Graph API调用在Azure Active Directory Graph API中使用指定的DirectoryRole创建用户(工作帐户)。

I can make two separate calls (one to create the user and one to assign the DirectoryRole) but is it possible to include the role in the POST user payload and assign the role in the same call? 我可以进行两个单独的调用(一个用于创建用户,一个用于分配DirectoryRole),但是是否可以将角色包含在POST用户有效负载中,并在同一调用中分配角色?

Apparently as of today, the Azure AD Graph REST Api is not able to create a user with a non-default directory role in one call 显然,从今天开始,Azure AD Graph REST Api无法在一个调用中创建具有非默认目录角色的用户

So we should make 2 separate calls To create a user and a second call to make the user a member of the Directory Role. 因此,我们应该进行两个单独的调用以创建用户,并进行第二次调用以使该用户成为目录角色的成员。

I didn't find any documentation around this, but had a chat with someone from AD team and he informed me of this. 我没有找到与此相关的任何文档,但是与广告团队的某人聊天,他将这一情况告知了我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM