Introduction

The Default SPO admin center provides an option to restrict the access of the complete SPO tenant based on the network/location. Restricting a particular Site collection with the SPO admin center isn’t possible. However, this can be achieved by integrating SPO with Azure Active Directory. The Conditional Access feature of Azure Active Directory premium helps to restrict a particular site based on the device platforms, locations, client apps, and device state.

Configuring Trusted IPs

The organization’s IP should be marked as Trusted IPs in Azure in order to have uninterrupted and easily manageable connection with the Azure and Office365 Services.

SiteCollection Access Restriction

Configuration of Conditional Access

The Azure AD Conditional Access is part of Azure AD Premium P2 License.

SiteCollection Access Restriction

Note
No changes are required on the option which is selected by default.

SiteCollection Access Restriction

By selecting “Use App Enforced Restrictions”, the configuration settings of subsite collections will work along with the conditional access to manage the Access Controls of individual subsites.

SiteCollection Access Restriction

Access Restriction for specific Site

The final step is to update the configuration settings of the subsite for which the access restriction has to be applied.

SiteCollection Access Restriction

Get-SPOSite –Identity <Subsite URL> | fl

“Note that the Conditional Access Policy is set to Allow FullAccess”.

SiteCollection Access Restriction

Run the below command to block access for a particular site using conditional access.

“Set-SPOSite –Identity <Subsite URL> -ConditionalAccessPolicy BlockAccess”