-->

How to create a user (work account) with specified

2019-08-30 22:24发布

问题:

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.

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?

回答1:

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

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.