Skip to content

Latest commit

 

History

History
281 lines (200 loc) · 9.69 KB

File metadata and controls

281 lines (200 loc) · 9.69 KB
title Delete unifiedRoleDefinition
description Delete a unifiedRoleDefinition object.
ms.localizationpriority medium
author DougKirschner
ms.reviewer msodsrbac
ms.subservice entra-directory-management
doc_type apiPageType
ms.date 07/26/2024

Delete unifiedRoleDefinition

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

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)
  • Defender (Microsoft Defender XDR Unified RBAC)
  • directory (Microsoft Entra ID)

[!INCLUDE national-cloud-support]

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

[!INCLUDE permissions-table]

For a device management (Intune) provider

[!INCLUDE permissions-table]

For a Defender provider

[!INCLUDE permissions-table]

For a directory (Microsoft Entra ID) provider

[!INCLUDE permissions-table]

[!INCLUDE rbac-role-definition-apis-write]

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}

To delete a role definition for a Defender provider:

DELETE /roleManagement/defender/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

[!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]

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


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

[!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]

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


Response

The following example shows the response.

HTTP/1.1 204 No Content

Example 3: Delete a unifiedRoleDefinition resource for a Defender provider

Request

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

[!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 snippet-not-available] [!INCLUDE sdk-documentation]

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


Response

The following example shows the response.

HTTP/1.1 204 No Content