< Back

Remove-OneLoginUserRole

Sat Jan 18, 2020 6:06 pm

NAME Remove-OneLoginUserRole



SYNOPSIS

Removes a role from a OneLogin user.





SYNTAX

Remove-OneLoginUserRole [<CommonParameters>]





DESCRIPTION

Removes a role from a OneLogin user.





PARAMETERS

-Identity <>

Specifies a OneLogin user who you'd like to modify.



Required? false

Position? named

Default value None

Accept pipeline input? false

Accept wildcard characters? false



-RoleId <>

Specifies one or more roles that you'd like to remove by their numerical Id. These Ids can be found using the

Get-OneLoginRole command.



Required? false

Position? named

Default value None

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

OneLoginUser







OUTPUTS



NOTES









---------- -------------- Example 1 -------------- ----------



$Role = Get-OneLoginRole -Filter @{name = "Sales"}

Get-OneLoginUser -Identity 123456 | Remove-OneLoginUserRole -RoleId $Role.Id



This example shows how to find a OneLogin role and remove that role from a user's list of assigned roles. Note

that you'll be prompted to confirm that you'd like to take this action.

---------- -------------- Example 2 -------------- ----------



Get-OneLoginUser -Identity 123456 | Remove-OneLoginUserRole -RoleId $Role.Id -Confirm:$false



This example shows how to remove a role from a OneLogin user without being prompted for confirmation.



RELATED LINKS

OneLogin roles https://developers.onelogin.com/api-doc ... /get-roles

OneLogin user roles https://developers.onelogin.com/api-doc ... s-for-user