Removes the specified user id from the specified role id.
Remove-PCCustomerRoleMember [[-TenantId] <String>] [-RoleId] <String> [-UserId] <String> [[-SaToken] <String>] [<CommonParameters>]
The Remove-PCCustomerRoleMember cmdlet removes the specified user from the specified role.
Specifies the tenant used for scoping this cmdlet.
Required? false
Position? 1
Default value $GlobalCustomerId
Accept pipeline input? false
Accept wildcard characters? false
Specifies the role guid for which to remove the user.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
Specifies the user id to remove from the role.
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
Specifies a security token for authenticating and executing the cmdlet.
Required? false
Position? 4
Default value $GlobalToken
Accept pipeline input? false
Accept wildcard characters? false
Remove a user from a specified role.
Get a customer named Wingtip Toys
$customer = Get-PCCustomer | Where-Object {$_.CompanyProfile.CompanyName -eq 'Wingtip Toys'}
Get a role named
$role = Get-PCCustomerRole -TenantId $customer.id | Where-Object {$_.Name -eq 'Helpdesk Administrator'}
Get a User
$user = Get-PCCustomerUser -TenantId $customer.id | Where-Object {$_.userPrincipalName -eq 'John@wingtiptoyscsptest.onmicrosoft.com'}
Remove a user from a role
Remove-PCCustomerRoleMember -TenantId $customer.id -RoleId $role.id -UserId $user.id