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-2006587%22%20slang%3D%22en-US%22%3ERe%3A%20Revoke%20MFA%20sessions%20for%20multiple%20Users%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2006587%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F97603%22%20target%3D%22_blank%22%3E%40Pontus%20Sj%C3%A4lander%3C%2FA%3E%26nbsp%3B%20Thank%20You%20%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%23%20Initiates%20a%20connection%20to%20Azure%20Active%20Directory.%3C%2FP%3E%3CP%3EConnect-MsolService%3C%2FP%3E%3CP%3E%23Import%20CSV%20file%20and%20Resets%20the%20strong%20authentication%20method%20by%20using%20a%20user%20principal%20name%3C%2FP%3E%3CP%3EImport-Csv%20%22C%3A%5CTemp%5CMFAUsersStatus.csv%22%20%7C%20ForEach-Object%20%7B%3CBR%20%2F%3E%24UserPrincipalName%20%3D%20%24_.%22UserPrincipalName%22%3C%2FP%3E%3CP%3EReset-MsolStrongAuthenticationMethodByUpn%20-UserPrincipalName%20%24UserPrincipalName%3CBR%20%2F%3E%7D%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
}