This topic contains 2 replies, has 2 voices, and was last updated by
April 18, 2017 at 8:03 pm #68887ParticipantTopics: 4Replies: 5Points: 21Rank: Member
So I want to change the permissions to a bunch of OneDrive users (sharepoint online) from full control to reader. There doesn't seem to be any easy way to do this. Everything I search is how to create the group, set the access, and then add the user. I was not able to find anything that would just change the user access in onedrive.
I'm assuming that I could do a remove-spo user, create a readers group, then re-add the user back in, but I would think there would be an easier way.
I'm somewhat new to powershell and know even less about how sharepoint online works; so any actual code would help.
April 18, 2017 at 9:50 pm #68901ParticipantTopics: 0Replies: 10Points: 0Rank: Member
I'm not an expert on the subject by any means, but I did find a useful resource which may be along the lines of what you're looking for.
I believe the easiest way would be to create the new group, add all the users into the new group, then remove the previous permissions. Without a test environment, I can't give you much more than a scaffold for what your code will end up looking like.
New-SPOSiteGroup -Site $yoursite -Group $newgroup -PermissionLevels "Readers"
Then I'd get a list of users in the old group:
$myusers = Get-SPOUser -Site $yoursite -Group $oldgroup
And add/remove the users to the appropriate groups. The guide I linked has code on how to do that as well. Basically you'll pipe $myusers into the add function for the new group, and once that's done you can do the same to remove them from the old group. Let me know if you have more questions!
April 19, 2017 at 8:59 pm #69013ParticipantTopics: 4Replies: 5Points: 21Rank: Member
Thanks Bryce...that's what I was assuming that I would need to do. It just seems weird that it allows you to create/edit permissions/delete groups, but doesn't have anything for users.
The topic ‘Sharepoint online: change user permissions’ is closed to new replies.