How to Log Out User Sessions in SharePoint Online?

Requirement: Force Log Off all sessions of a user, as he lost his mobile device, which is logged-in with SharePoint Online sites.

How to sign out of SharePoint Online?

As an end-user, you can sign out from SharePoint by clicking on the User icon in the welcome menu and then clicking on the “Sign out” link. 

how to sign out of sharepoint online

Once you are signed out, you’ll see a message “You’re signed out of Office 365”.

PowerShell to Log Out User from All Sessions in SharePoint Online

We can force log off a user from all his sessions opened with SharePoint Online using Revoke-SPUserSession cmdlet. Here is how:

#Connect to SharePoint Online
Connect-SPOService -URL -credential (Get-Credential)

#Logoff User
Revoke-SPOUserSession -User [email protected] -Confirm:$false 

This prompts for credentials to connect to the SharePoint Online admin center, disconnects all sessions of a given user, and takes them to the login page.

sharepoint online sign out

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

Leave a Reply