Remove-EntraUserAppRoleAssignment
Removes a user application role assignment.
Syntax
Remove-EntraUserAppRoleAssignment
-AppRoleAssignmentId <String>
-ObjectId <String>
[<CommonParameters>]
Description
The Remove-EntraUserAppRoleAssignment
cmdlet removes a user application role assignment in Microsoft Entra ID.
Examples
Example 1: Remove user app role assignment
Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All'
$RemoveAppRoleParams = @{
ObjectId = 'SawyerM@Contoso.com'
AppRoleAssignmentId = 'C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w'
}
Remove-EntraUserAppRoleAssignment @RemoveAppRoleParams
This example demonstrates how to Remove the user app role assignment in Microsoft Entra ID.
-ObjectId
parameter specifies the user ID.-AppRoleAssignmentId
parameter specifies the application role assignment ID.
Use the Get-EntraUserAppRoleAssignment
cmdlet to get AppRoleAssignmentId
details.
Parameters
-AppRoleAssignmentId
Specifies the ID of an application role assignment.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ObjectId
Specifies the ID (as a UserPrincipleName or ObjectId) of a user in Microsoft Entra ID.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |