SharePoint Online: “Edit User permissions”, “Remove User Permissions” greyed out!

Problem: In SharePoint Online site, under site permissions, unable to edit or remove user permissions as “Edit user permissions” and “Remove user Permissions” buttons are disabled to everyone including site owners and site collection administrators!

sharepoint online edit user permissions greyed out

Root Cause:

This is because the SharePoint Online site is connected to a Microsoft Group and permissions should be managed at the Office 365 Group-level instead of the SharePoint level. So, we cannot change the permissions through the web UI! Although we can swap the permissions of the Office 365 Group Owners/Members/Visitors through the site permissions link in the site settings menu, This doesn’t help when we have to change the site members permissions from “Edit” to “Contribute”!

change user permissions in group connected sharepoint online sites

Apparently, if your subsite/list/library inherits permissions from the parent object, you can’t change or remove user permissions.

Solution:

Although the user interface doesn’t support editing or removing user or group permissions, we can utilize the PowerShell script to edit user permissions in SharePoint Online.

$SiteURL = "https://crescent.sharepoint.com/sites/HR"

Try {
    #Connect to PnP Online
    Connect-PnPOnline -Url $SiteURL -UseWebLogin

    #Get the Default Members Group 
    $MembersGroup = Get-PnPGroup -AssociatedMemberGroup
  
    #Grant "Contribute" permission to the Group and remove "Edit"
    Set-PnPGroupPermissions -Identity $MembersGroup -AddRole "Contribute" -RemoveRole "Edit"

    Write-Host "Removed 'Edit' Permissions and Granted 'Contribute' to $($MembersGroup.Title). " -foregroundcolor Green
}
Catch {
    write-host -f Red "Error Setting Permissions!" $_.Exception.Message
}  

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

Leave a Reply