Closed MuyBien closed 7 years ago
Roles.setUserRoles( userID, newRole, group );
seems to do the trick :)
The below is the best page to visit remove roles from SharePoint group. https://github.com/SharePoint/PnP-PowerShell/blob/master/Documentation/SetPnPGroupPermissions.md
But here I want to know if I want to remove all Roles. How to do .
Please help me
Hi! I have several groups named for example: 'soccer', 'volleyball', 'waterpolo'... In each group, you can have one of 3 different roles: 'admin', 'captain', 'player'. I have a method to set a role to a user within a group, but I don't know the good method to remove all others roles before adding the new one. (I'm using the V2 package)
Removing one by one all roles (even if user do not have it)
Using setRole (working with groups?)
Thanks!