Sign Out Office 365 Users on a Shared Computer
Question details
Sign out Office 365 users on a shared computer, preferably through local automation.

- Product
- Microsoft Office 365
- Device & OS
- not provided
- Scenario
- An administrator wants to remove Office authentication from shared or semi-public computers.
- Observed behavior
- Office sign-in state returns after Credential Manager entries and Office identity registry keys are deleted.
Identify the affected user accounts and decide whether signing them out on all devices is acceptable. For administrative session revocation, prepare a Microsoft Entra administrator account with the required permissions.
Revoke User Sign-In Sessions with Microsoft Graph PowerShell
Use this administrator-side method when users must reauthenticate and signing them out across devices is acceptable.
Office uses modern authentication tokens, so deleting local registry keys and Credential Manager entries alone may not end a session. Revoking sessions affects the selected user across devices; it is not limited to one shared computer and does not necessarily remove local account information.
Revocation can take time to take effect, and existing access tokens may remain valid until they expire.
Open PowerShell and run Install-Module Microsoft.Graph if the Microsoft Graph module is not already installed.
Run Connect-MgGraph -Scopes "User.RevokeSessions.All" and sign in with an appropriately authorized administrator account. Consent may be required.
Run Revoke-MgUserSignInSession -UserId "user@example.com", replacing the address with the user's account ID or user principal name. Repeat for each affected user.
After allowing time for revocation, reopen an Office app with an affected account and check whether it prompts the user to sign in again.

Sign Out of Office on the Shared Computer
Use the Office account menu when each user can sign out interactively on the computer.
Use WPS Office as an Alternative for Shared-Computer Documents
WPS Office is a free, lightweight and easy-to-use Office alternative with a familiar interface. Its Microsoft Office format compatibility helps users move existing documents into WPS, though it does not revoke Microsoft Office sessions.

Frequently Asked Questions
Why does Office remain signed in after I delete registry keys?
Office uses modern authentication tokens, so registry keys and Credential Manager entries are not necessarily the only sources of sign-in state. Deleting them alone is not a reliable session-revocation method.
Can I revoke sessions for just one shared computer?
Revoke-MgUserSignInSession targets a user, not a specific computer. It affects that user's sessions across devices and does not itself remove local account information.
Where can a user sign out of a desktop Office app?
In Word or Excel, open File > Account and select Sign out under the signed-in account. Reopen the app and check the Account page to verify the state.
Does session revocation immediately invalidate every access token?
Not necessarily. Revocation can take time to take effect, and existing access tokens may remain valid until they expire.




