Remove-EntraDirectoryRoleDefinition
Delete a Microsoft Entra ID Directory roleDefinition object.
Syntax
Remove-EntraDirectoryRoleDefinition
-UnifiedRoleDefinitionId <String>
[<CommonParameters>]
Description
Delete a Microsoft Entra ID Directory roleDefinition object by ID.
You can't delete built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license.
Examples
Example 1: Remove a specified role definition
Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory'
Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1
This example demonstrates how to remove the specified role definition from Microsoft Entra ID.
-UnifiedRoleDefinitionId
parameter specifies the roleDefinition object ID.
Parameters
-UnifiedRoleDefinitionId
The unique identifier of an object in Microsoft Entra ID.
Type: | System.String |
Aliases: | Id |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
System.String
Outputs
System.Object
Notes
Remove-EntraRoleDefinition
is an alias for Remove-EntraDirectoryRoleDefintion
.