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


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


  • 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, 2018 at 13:14
  • That sounds about right :-) Jul 26, 2018 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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