One Drive Revoke Access Syntax

Roger Roger 4,951 Reputation points
2021-01-21T20:20:34.233+00:00

Hi Experts

I have provided user1 access to user2's onedrive using the below syntax. now i want to revoke the access of user1.

Set-SPOUser -Site https://contoso-my.sharepoint.com/personal/User2_LN_contoso_com -LoginName user1@Company portal .com -IsSiteCollectionAdmin $true

will the below syntax work.

Set-SPOUser -Site https://contoso-my.sharepoint.com/personal/User2_LN_contoso_com -LoginName user1@Company portal .com -IsSiteCollectionAdmin $false

Microsoft Office Online Server
Microsoft Office Online Server
Microsoft on-premises server product that runs Office Online. Previously known as Office Web Apps Server.
583 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,565 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,166 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,795 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jerry Xu-MSFT 7,916 Reputation points
    2021-01-22T01:59:34.87+00:00

    Hi, @Roger Roger ,

    I tested with the same syntax and it works properly in my end. The only thing needs to be changed shall be $true and $false. Would you like to provide a screenshot of the cmdlet returned syntax error? And you can try again with it, ensure there is no mistakes.

    59383-image.png


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful