Access Requests in SharePoint

The access request feature allows people to request access to content that they do not currently have permission to see. As a site owner, you can configure the feature to send you mail when someone requests access to a site. You can then choose whether to approve or decline their request. If you approve the request, you can also specify the specific level of permission you’d like to assign to a user.

But, if you are in my case that I needed to configure the access request in all the web app, you can use the following PowerShell:

$spsites = get-spsite -Limit All

foreach($spsite in $spsites)

{

foreach($SPweb in $spsite.AllWebs)

{

# if a site inherits permissions, then the Access request mail setting also will be inherited

if (!$SPweb.HasUniquePerm)

{

write-host $SPweb "Inheriting from Parent site";

}

elseif($SPweb.RequestAccessEnabled)

{

$SPweb.RequestAccessEmail = "mail@maildomain.com";

$SPweb.Update();

write-host $SPWEB "Configured"

}

}

}

Hope it helps!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s