Delete unifiedRoleDefinition

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.

Delete a unifiedRoleDefinition object for an RBAC provider. You cannot delete built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license.

The following RBAC providers are currently supported:

  • Cloud PC
  • device management (Intune)
  • directory (Microsoft Entra ID)

This API is available in the following national cloud deployments.

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

Permissions

The following tables show the least privileged permission or permissions required to call this API on each supported resource type. Follow best practices to request least privileged permissions. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

For a Cloud PC provider

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) DeviceManagementRBAC.ReadWrite.All CloudPC.ReadWrite.All, Directory.ReadWrite.All, RoleManagement.ReadWrite.CloudPC, RoleManagement.ReadWrite.Directory
Delegated (personal Microsoft account) Not supported. Not supported.
Application DeviceManagementRBAC.ReadWrite.All CloudPC.ReadWrite.All, Directory.ReadWrite.All, RoleManagement.ReadWrite.CloudPC, RoleManagement.ReadWrite.Directory

For a device management (Intune) provider

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

For a directory (Microsoft Entra ID) provider

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) DeviceManagementRBAC.ReadWrite.All CloudPC.ReadWrite.All, Directory.ReadWrite.All, RoleManagement.ReadWrite.CloudPC, RoleManagement.ReadWrite.Directory
Delegated (personal Microsoft account) Not supported. Not supported.
Application DeviceManagementRBAC.ReadWrite.All CloudPC.ReadWrite.All, Directory.ReadWrite.All, RoleManagement.ReadWrite.CloudPC, RoleManagement.ReadWrite.Directory

HTTP request

To delete a role definition for a device management provider:

DELETE /roleManagement/deviceManagement/roleDefinitions/{id}

To delete a role definition for a directory provider:

DELETE /roleManagement/directory/roleDefinitions/{id}

To delete a role definition for a Cloud PC provider:

DELETE /roleManagement/cloudPc/roleDefinitions/{id}

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns 204 No Content response code. It doesn't return anything in the response body.

Example 1: Delete a unifiedRoleDefinition resource for a directory provider

Request

DELETE https://graph.microsoft.com/beta/roleManagement/directory/roleDefinitions/f189965f-f560-4c59-9101-933d4c87a91a

Response

The following example shows the response.

HTTP/1.1 204 No Content

Example 2: Delete a unifiedRoleDefinition resource for a Cloud PC provider

Request

DELETE https://graph.microsoft.com/beta/roleManagement/cloudPC/roleDefinitions/b7f5ddc1-b7dc-4d37-abce-b9d6fc15ffff

Response

The following example shows the response.

HTTP/1.1 204 No Content