Skip to content

Latest commit

 

History

History
124 lines (93 loc) · 4.47 KB

File metadata and controls

124 lines (93 loc) · 4.47 KB
title Create engagementRoleMember
description Create a new engagementRoleMember object that assigns a Viva Engage role to a user.
author richafnu
ms.date 09/22/2025
ms.localizationpriority medium
ms.subservice viva-engage
doc_type apiPageType

Create engagementRoleMember

Namespace: microsoft.graph

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

[!INCLUDE national-cloud-support]

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.

[!INCLUDE permissions-table]

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/v1.0/employeeExperience/roles/a40473a5-0fb4-a250-e029-f6fe33d07733/members
Content-Type: application/json

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

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


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"
}