Forum Discussion

VasilMichev's avatar
Dec 05, 2016

Revoke access to Office 365 applications

Well, with the AzureAD PowerShell module we finally have a proper way to revoke refresh tokens for Office 365 users. Namely, we can use the Revoke-AzureADUserAllRefreshToken cmdlet to invalidate the refresh token. Here's an example:

 

Revoke-AzureADUserAllRefreshToken -ObjectId 582b2b38-888c-4b85-8471-c9716cb4791b

 

and a more useful one:

 

Get-AzureADUser -SearchString huku | Revoke-AzureADUserAllRefreshToken

 

You'll need the AzureAD PowerShell module V2 available here: https://www.powershellgallery.com/packages/AzureAD

 

Just to clarify, the user will still be able to access data for some time (until the access token is revoked or the app is closed).

Resources