Consider turning off access requests in SharePoint Online for particular situations. The capability for individuals to request access to your SharePoint Online site can be deactivated either through site settings or via PowerShell. In this blog post, we will guide you on using PowerShell to turn off (or on) user access requests in SharePoint Online.

To disable access requests for a SharePoint Online site, do the following:

  1. Navigate to the SharePoint Online site where you wish to deactivate access requests.
  2. Select the Settings gear icon in the upper-right corner and choose “Site Permissions” from the drop-down menu.
  3. Within the Site Permissions panel, click on the “Change how members can share” link under “Site Sharing.

4. Toggle the “Access Request” settings to the “OFF” position by sliding the button adjacent to it.

5. Click on the “Save” button to commit your changes.

Access requests for your site have been deactivated. Consequently, users without permission will be unable to request access to resources.

SharePoint Online: Disable Access Request using PowerShell

Using PnP PowerShell, let’s disable access requests for a given SharePoint Online site collection. Learn how to install PnP PowerShell here.

PowerShell to Disable Access Request for All Sites in the Tenant

Let’s show how automating the process of disabling access requests across all SharePoint Online sites in the tenant. This PowerShell script systematically navigates through each site within the tenant and disables access requests if the site employs unique permissions.

Ensure that you possess access to all sites within your tenant before executing this script. Otherwise, you may encounter “Access denied” or “401 unauthorized” errors.