Commands › SharePoint Online

Enable-SPOSiteRestrictedAppAccessControl

SharePoint Online Microsoft.Online.SharePoint.PowerShell Enable-*

Turns on Application Restrictions enforcement for a site using its configured mode and lists.

Quick start script

# Enable-SPOSiteRestrictedAppAccessControl — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-SPOSiteRestrictedAppAccessControl
$before | Format-List

# 3. Make the change (dry run first)
Enable-SPOSiteRestrictedAppAccessControl -Identity <String> -WhatIf
Enable-SPOSiteRestrictedAppAccessControl -Identity <String>

# 4. Verify and diff
$after = Get-SPOSiteRestrictedAppAccessControl
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Enable-SPOSiteRestrictedAppAccessControl -Identity <String> [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (3)

ParameterTypeRequiredWhat it controls
-Identity String yes Specifies the site to enable. Provide either the site URL or the site ID.
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet. This cmdlet uses `ConfirmImpact.High`, so it prompts by default. Use `-Confirm:$false` to suppress the prompt in automation.
-WhatIf SwitchParameter Shows what would happen if the cmdlet runs. The cmdlet isn't run.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.