Commands › SharePoint Online

Revoke-SPOTenantServicePrincipalPermission

SharePoint Online Microsoft.Online.SharePoint.PowerShell Revoke-*

Revokes a permission that was previously granted to the "SharePoint Online Client" service principal

Quick start script

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

# 2. Run and inspect
Revoke-SPOTenantServicePrincipalPermission -ObjectId <String> | Format-List

# 3. Export for evidence / drift tracking
Revoke-SPOTenantServicePrincipalPermission | Export-Clixml .\SPOTenantServicePrincipalPermission-$(Get-Date -Format yyyyMMdd).xml

Syntax

Revoke-SPOTenantServicePrincipalPermission -ObjectId <String> [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (3)

ParameterTypeRequiredWhat it controls
-ObjectId String yes The Object ID of the permission grant to revoke
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-WhatIf SwitchParameter Shows what would happen if the cmdlet runs. The cmdlet is not run.

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