Sets permissions for a user on a OneDrive.
The Set-CIPPOneDrivePerms function is used to give or remove access permissions for a specified user on a OneDrive.
![]()
![]()
Specifies whether to remove the access permission for the specified user. If set to $true, the permission will be removed. If set to $false, the permission will be granted.
![]()
![]()
The User Principal Name (UPN) of the user to whom access is being granted or removed.
PS > Set-CIPPOneDrivePerms -CustomerTenantID "contoso.onmicrosoft.com" -OneDriveUserUPN "john@contoso.com" -RemovePermission $false -GiveAccessToUPN "jane@contoso.com"
PS > Set-CIPPOneDrivePerms -CustomerTenantID "contoso.onmicrosoft.com" -OneDriveUserUPN "john@contoso.com" -RemovePermission $true -GiveAccessToUPN "jane@contoso.com"