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.

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

  • 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) – Tom Urwin Jul 26 '18 at 13:14
  • That sounds about right :-) – Kasper Bo Larsen Jul 26 '18 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.