Revoke MFA sessions for multiple Users

%3CLINGO-SUB%20id%3D%22lingo-sub-1991036%22%20slang%3D%22en-US%22%3ERevoke%20MFA%20sessions%20for%20multiple%20Users%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1991036%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20There%20%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20it%20possible%20to%26nbsp%3Brevoke%20MFA%20sessions%20and%20require%20re-register%20for%20multiple%20users%26nbsp%3B%20or%20a%20group%20of%20users%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20You%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1991036%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20MFA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1995595%22%20slang%3D%22en-US%22%3ERe%3A%20Revoke%20MFA%20sessions%20for%20multiple%20Users%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1995595%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F419565%22%20target%3D%22_blank%22%3E%40Lassaad_TOUKABRI%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3EThe%20best%20way%20to%20achieve%20this%20is%20through%20a%20PowerShell%20script%20I%20would%20say%2C%20looping%20through%20the%20users%20from%20an%20.CSV%20for%20example.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EPlease%20check%20the%20commands%20below%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fmsonline%2Freset-msolstrongauthenticationmethodbyupn%3Fview%3Dazureadps-1.0%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EReset-MsolStrongAuthenticationMethodByUpn%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fazuread%2Frevoke-azureaduserallrefreshtoken%3Fview%3Dazureadps-2.0%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ERevoke-AzureADUserAllRefreshToken%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi There ,

 

Is it possible to revoke MFA sessions and require re-register for multiple users  or a group of users ?

 

Thank You

2 Replies

@Lassaad_TOUKABRI 
The best way to achieve this is through a PowerShell script I would say, looping through the users from an .CSV for example.

Please check the commands below:

Reset-MsolStrongAuthenticationMethodByUpn
Revoke-AzureADUserAllRefreshToken



 

@Pontus Själander  Thank You , 

 

# Initiates a connection to Azure Active Directory.

Connect-MsolService

#Import CSV file and Resets the strong authentication method by using a user principal name

Import-Csv "C:\Temp\MFAUsersStatus.csv" | ForEach-Object {
$UserPrincipalName = $_."UserPrincipalName"

Reset-MsolStrongAuthenticationMethodByUpn -UserPrincipalName $UserPrincipalName
}