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 "[email protected]" -RemovePermission $false -GiveAccessToUPN "[email protected]"
PS > Set-CIPPOneDrivePerms -CustomerTenantID "contoso.onmicrosoft.com" -OneDriveUserUPN "[email protected]" -RemovePermission $true -GiveAccessToUPN "[email protected]"