0

As part of our department site creation script, we want 'everyone except external users' to be part of the site Visitors group instead of Members.

Can someone please help me do this with CSOM? Have tried to fudge together some other code but it's not working.

1 Answer 1

0

I guess you are using PowerShell to spin up the department sites, so perhaps Set-PnPGroupPermissions is just what you are looking for?

https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/set-pnpgrouppermissions?view=sharepoint-ps

2
  • Thanks, but I am trying to use CSOM to stay in line with my current code. E.g. I am breaking Inheritance and removing the Visitors group this way, so assumed I could do the same with moving the 'everyone' group? $listName.RoleAssignments.Groups.Remove($Group) Commented Jul 26, 2018 at 13:14
  • That sounds about right :-) Commented Jul 26, 2018 at 19:47

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.