Commands › SharePoint Online

Revoke-SPOUserSession

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

Provides IT administrators the ability to invalidate a particular users' O365 sessions across all their devices.

Quick start script

# Revoke-SPOUserSession — 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-SPOUserSession -User <String> | Format-List

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

Syntax

Revoke-SPOUserSession [-User] <String> [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (3)

ParameterTypeRequiredWhat it controls
-User String yes Specifies a user name. For example, user1@contoso.com
-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.