Forum Discussion
Revoke MFA sessions for multiple Users
Lassaad
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:
https://docs.microsoft.com/en-us/powershell/module/msonline/reset-msolstrongauthenticationmethodbyupn?view=azureadps-1.0
https://docs.microsoft.com/en-us/powershell/module/azuread/revoke-azureaduserallrefreshtoken?view=azureadps-2.0
- LassaadDec 21, 2020MCT
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
}- juanayalasanchezSep 02, 2022Copper Contributor
Lassaad could you please share the csv structure for this file "MFAUsersStatus.csv"?
Thank u so much.