2

On one of our Sharepoint 2010 site collection we would like to disable access requests on a few hundred sites, and looking for a client-side solution to do this. I understand that CSOM does not support this. I checked the Web Services documentation, and under "Permissions" I did not see any suitable method. Can this be found somewhere else, or do I really need to run a script like in powershell on the server?

1 Answer 1

1

I don't think you can do it on client side, but using powershell it is quite easy

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

$WebAppURL = "http://your-web-app-url.com/" 



#Get all sites
$WebsColl = Get-SPWebApplication $WebAppURL | Get-SPSite -Limit All | Get-SPWeb -Limit All

ForEach ($web in $WebsColl)
    {
        if($web.RequestAccessEnabled -and $web.Permissions.Inherited -eq $false)
        {
            #Disable access request
            $web.RequestAccessEmail=""
            $web.Update()
            write-host "Access request disabled at site:"$web.URL
        }
    }

Read more: http://www.sharepointdiary.com/2014/11/manage-access-request-settings-in-sharepoint-2013.html#ixzz4WIFWoJUF

How to deny the requests access on a site collection

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.