Hi @Austin Admin ,
You could remove group from Folder Permissions using PowerShell as a workaround.
PowerShell commands:
#Load SharePoint CSOM Assemblies
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
Function Remove-SPOGroupPermissionsFromList()
{
param
(
[Parameter(Mandatory=$true)] [string] $SiteURL,
[Parameter(Mandatory=$true)] [string] $FolderURL,
[Parameter(Mandatory=$true)] [string] $GroupName
)
Try {
#Get credentials to connect
$Cred= Get-Credential
$Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)
#Setup the context
$Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
$Ctx.Credentials = $Credentials
$Web = $Ctx.web
#Get the Folder
$Folder = $Web.GetFolderByServerRelativeUrl($FolderURL)
$Ctx.Load($Folder)
$Ctx.ExecuteQuery()
#Break Permission inheritence - Keep all existing list permissions & Don't keep Item level permissions
$Folder.ListItemAllFields.BreakRoleInheritance($True,$False)
$Ctx.ExecuteQuery()
Write-host -f Yellow "Folder's Permission inheritance broken..."
#Get the SharePoint Site Group object
$Group =$Web.SiteGroups.GetByName($GroupName)
$Ctx.load($Group)
#Get permissions assigned to the folder
$Ctx.Load($Folder.ListItemAllFields.RoleAssignments)
$Ctx.ExecuteQuery()
#Check if the Group has permission on the list
[Bool]$GroupFound = $False
ForEach($RoleAssignment in $Folder.ListItemAllFields.RoleAssignments)
{
$ctx.Load($RoleAssignment.Member)
$Ctx.ExecuteQuery()
#remove Group permission from folder
If($RoleAssignment.Member.LoginName -eq $Group.LoginName)
{
$Folder.ListItemAllFields.RoleAssignments.GetByPrincipal($Group).DeleteObject()
$Ctx.ExecuteQuery()
$GroupFound = $True
Write-host "Group Permissions Removed from the List Successfully!" -ForegroundColor Green
}
}
#If Group doesn't exist in list permissions
If($GroupFound -eq $False) { Write-host "Group Not found in List Permissions!" -ForegroundColor Red}
}
Catch {
write-host -f Red "Error Removing Group permissions from the Folder!" $_.Exception.Message
}
}
#Config Variables
$SiteURL="https://xxx"
$FolderURL="/xxx/xxx"
$GroupName="xxx"
#Call the function to remove Group permissions from a list
Remove-SPOGroupPermissionsFromList -SiteURL $SiteURL -FolderURL $FolderURL -GroupName $GroupName
For Reference: Remove Group from Folder Permissions using PowerShell
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.