Edit

Share via


Create engagementRoleMember

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Create a new engagementRoleMember object that assigns a Viva Engage role to a user.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) EngagementRole.ReadWrite.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application EngagementRole.ReadWrite.All Not available.

HTTP request

POST /employeeExperience/roles/{engagementRoleId}/members

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of the engagementRoleMember object.

You can specify the following properties when you create an engagementRoleMember.

Property Type Description
createdDateTime DateTimeOffset The date and time when the role was assigned to the user. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
userId String The Microsoft Entra ID of the user who has the role assigned.

Response

If successful, this method returns a 201 Created response code and an engagementRoleMember object in the response body.

Examples

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/employeeExperience/roles/a40473a5-0fb4-a250-e029-f6fe33d07733/members
Content-Type: application/json

{
  "user@odata.bind": "https://graph.microsoft.com/beta/users('e8d9f6a2-1c34-4b7a-9f11-2a4d8b7c9e01')"
}

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 201 Created
Content-Type: application/json

{
  "@odata.type": "#microsoft.graph.engagementRoleMember",
  "id": "a40473a5-0fb4-a250-e029-f6fe33d07733",
  "userId": "e8d9f6a2-1c34-4b7a-9f11-2a4d8b7c9e01",
  "createdDateTime": "2025-09-22T14:03:00Z"
}