Update unifiedRoleAssignmentMultiple

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.

Update an existing unifiedRoleAssignmentMultiple object of an RBAC provider.

The following RBAC providers are currently supported:

  • Cloud PC
  • device management (Intune)

In contrast, unifiedRoleAssignment does not support update.

Permissions

Depending on the RBAC provider and the permission type (delegated or application) that is needed, choose from the following table the least privileged permission required to call this API. To learn more, including taking caution before choosing more privileged permissions, see Permissions.

For Cloud PC provider

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

For Device management (Intune) provider

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

HTTP request

To update an existing unfiedRoleAssignmentMultiple for a Cloud PC provider:

PATCH /roleManagement/cloudPC/roleAssignments

To update an existing unfiedRoleAssignmentMultiple for an Intune provider:

PATCH /roleManagement/deviceManagement/roleAssignments

Request headers

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

Request body

In the request body, supply the values for relevant fields that should be updated. Existing properties that are not included in the request body will maintain their previous values or be recalculated based on changes to other property values. For best performance, don't include existing values that haven't changed.

Response

If successful, this method returns a 200 OK response code and an updated unifiedAssignmentMultiple object in the response body.

Example

Example 1: Update an existing unfiedRoleAssignmentMultiple in an Intune provider

Request

The following is an example of the request.

PATCH https://graph.microsoft.com/beta/roleManagement/deviceManagement/roleAssignments/lAPpYvVpN0KRkAEhdxReEJC2sEqbR_9Hr48lds9SGHI-1
Content-type: application/json

{ 
    "principalIds": ["0aeec2c1-fee7-4e02-b534-6f920d25b300", "2d5386a7-732f-44db-9cf8-f82dd2a1c0e0"]
}

Response

The following is an example of the response.

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

HTTP/1.1 204 OK

Example 2: update an existing unfiedRoleAssignmentMultiple in a Cloud PC provider

Request

PATCH https://graph.microsoft.com/beta/roleManagement/cloudPC/roleAssignments/dbe9d288-fd87-41f4-b33d-b498ed207096
Content-type: application/json

{
    "displayName": "NewName",
    "description": "A new roleAssignment"
}

Response

Note: The response object shown here might be shortened for readability. All the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#roleManagement/cloudPC/roleAssignments/$entity",
    "id": "dbe9d288-fd87-41f4-b33d-b498ed207096",
    "description": "A new roleAssignment",
    "displayName": "NewName",
    "roleDefinitionId": "b5c08161-a7af-481c-ace2-a20a69a48fb1",
    "principalIds": [
        "0aeec2c1-fee7-4e02-b534-6f920d25b300",
        "2d5386a7-732f-44db-9cf8-f82dd2a1c0e0"
    ],
    "directoryScopeIds": [
        "/"
    ],
    "appScopeIds": []
}