Kill a live Microsoft Office 365 session

dztdagll
dztdagll used Ask the Experts™
on
Logged on to Microsoft Office 365 at Starbucks, but forgot to log off and left.  How do I get that session logged off?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2015
Distinguished Expert 2018
Commented:
Generally speaking, you cant, at least not for all services. For SharePoint Online/ODFB, you can use the following cmdlet:

Revoke-SPOUserSession -User baduser@domain.com -Confirm:$false

Open in new window


For the rest of the services, you either need to disable them temporary or simply change your password.

Author

Commented:
Thanks for getting back to me so quickly.  I'm shocked that Microsoft doesn't have a way of doing this given that people often forget to log off!

If i change the password, does that connection disconnect immediately?  if not, how long until it does?
Most Valuable Expert 2015
Distinguished Expert 2018
Commented:
The reality of modern applications is that access is cached in many forms, both by the server and the client. In the case of O365 the access token you get can live for several hours. Changing password can revoke the token, but it depends on many factors. The default timeouts are listed here: https://support.office.com/en-us/article/Session-timeouts-for-Office-365-37a5c116-5b07-4f70-8333-5b86fd2c3c40

Author

Commented:
I don't know whether you work for Microsoft or not, but this is a big problem.  Users log on to their email from all different kinds of locations.  They cannot be depended on to logoff.   i don't think I'll be moving my users to Office 365 until I can log them off from an admin portal or something....

Very helpful information.  Thank you so much!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial