Add directory role member

Namespace: microsoft.graph

Use this API to create a new directory role member.


One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) RoleManagement.ReadWrite.Directory, Directory.AccessAsUser.All
Delegated (personal Microsoft account) Not supported.
Application RoleManagement.ReadWrite.Directory

HTTP request

POST /directoryRoles/{id}/members/$ref

Request headers

Name Type Description
Authorization string Bearer {token}. Required.
Content-Type string application/json

Request body

In the request body, supply a JSON representation of a directoryObject or user object to be added.


If successful, this method returns 204 No Content response code.


Content-type: application/json

  "": "{id}"

Note: The response object shown here may be truncated for brevity.

HTTP/1.1 204 No Content
Content-type: text/plain