OneDrive for Business: Configure Access Requests Settings at Tenant Level
Requirement: Set Access Requests Settings to all OneDrive for Business sites at Tenant Level.
How to Configure Access Requests and Sharing Settings in OneDrive for Business Sites?
We can configure access request settings for all OneDrive for Business sites at the tenant level. There are two switches available to set access requests configuration in OneDrive for Business sites.
- ODBAccessRequests – Enables/Disables/Let the user select access requests for their OneDrive site.
- ODBMembersCanShare – Sets whether the Members of the site with edit permissions can share the site.
Possible values for the above switches are: On, Off, and Unspecified (lets the user specify settings for each OneDrive site.)
PowerShell to Configure OneDrive for Business Access Requests Settings
Here is the PowerShell script to set access requests settings for all OneDrive for Business sites at the tenant level.
#Parameters $TenantAdminURL = "https://crescent-admin.sharepoint.com" #Connect to Admin Center Connect-SPOService -Url $TenantAdminURL -Credential (Get-credential) #Set OneDrive for business access request settings Set-SPOTenant -ODBAccessRequests Off #Set "Allow members to share the site and individual files and folders." Set-SPOTenant -ODBMembersCanShare On
This PowerShell script overrides access request settings for all OneDrive for Business sites and changes the configuration as given in the script.
How to Set Access Requests Settings for OneDrive for Business site?
To configure access requests settings for each OneDrive site, do the following:
- From the OneDrive site, Click on “OneDrive settings” >> Click on “More Settings”>> Click on the “Return to the old site settings page” link at the bottom
- Now, on the site settings page, click on the “Site Permissions”, and then the “Access Requests Settings” button from the ribbon.
If the tenant level settings are configured to either On or Off, You can’t set these settings individually for each OneDrive for Business site. The tenant-level settings apply to all OneDrive for Business sites.
Access Request Settings: How it looks like?
When the access request is enabled, users get a “Sorry, you don’t have access.” message with a provision to request access.
If the access request is disabled, users who don’t have access to the resource will receive the “Access denied” page.