locked
Remove OD4B specific Site collection Admin RRS feed

  • Question

  • Hi 

    I need to remove a specific user (ben@contoso.com) from all the users OD4B (somehow he managed to make him a Site Collection Owner on all users - along with the user)

    So I need some help to a powershell script that runs on all the users OD4B

    I've tried this one blow - but that doesn't do the job - it just 'examine' - doesn't remove the SCA user I've defined

    https://www.jijitechnologies.com/blogs/add-remove-secondary-site-collection-admin-to-all-onedrive-for-business-users  


    Monday, August 13, 2018 12:24 PM

Answers

  • Hi JmATK,

    Make sure that run the SharePoint Online Management Shell as administrator to execute the script.

    Switch to another user account and check again.

    Provide your PowerShell script with us, then we can check if there is an issue.

    Best regards,

    Grace Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    • Marked as answer by JmATK Tuesday, August 14, 2018 1:21 PM
    Tuesday, August 14, 2018 10:13 AM

All replies

  • Hi JmATK,

    Per my test, in the  “$temp = Set-SPOUser -Site $sitename -LoginName $secondaryadmin -IsSiteCollectionAdmin $true -ErrorAction SilentlyContinue” command, I change “IsSiteCollectionAdmin” value to “$false” and the Site collection admin is removed from the OneDrive for Business successfully.

    Please check if the user account and URL are type correctly. And the IsSiteCollectionAdmin value is set to “$false”.

    Best regards,

    Grace Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Tuesday, August 14, 2018 7:51 AM
  • Hi Grace
    I've verified the settings - still error - must be doing something wrong :/   
    Tuesday, August 14, 2018 9:33 AM
  • Hi JmATK,

    Make sure that run the SharePoint Online Management Shell as administrator to execute the script.

    Switch to another user account and check again.

    Provide your PowerShell script with us, then we can check if there is an issue.

    Best regards,

    Grace Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    • Marked as answer by JmATK Tuesday, August 14, 2018 1:21 PM
    Tuesday, August 14, 2018 10:13 AM
  • Hi Grace 

    My bad" - I was running it from Windows ISE powershell 

    switching to SP online management - I get: the request failed with Http status 429 

    Update - It now runs :) 


    • Edited by JmATK Tuesday, August 14, 2018 1:21 PM
    Tuesday, August 14, 2018 1:18 PM