This script will generate a report of the MFA method used by the users in your organizations.
The following methods are available for users to choose from.
PhoneAppOTP
PhoneAppNotification
TwoWayVoiceMobile
OneWaySMS
PhoneAppNotification
TwoWayVoiceMobile
OneWaySMS
To run the below script connect to msonline powershell session.
#------------------------------------------------------- # Author: Sunil Chauhan # Email: sunilkms@gmail.com # ------------------------------------------------------- $ExporttoFile="MFA_Method_Used_report.csv" $users = Get-MsolUser -All $report=@() Foreach ($Ms in $users) { $Report+= "" | select @{N="upn";E={$ms.UserPrincipalName}}, @{N="Title";E={$ms.title}}, @{N="PhoneAppOTP";E={($MS.StrongAuthenticationMethods | ? {$_.MethodType -eq "PhoneAppOTP"}).IsDefault}}, @{N="PhoneAppNotification";E={($MS.StrongAuthenticationMethods | ? {$_.MethodType -eq "PhoneAppNotification"}).IsDefault}}, @{N="TwoWayVoiceMobile";E={($MS.StrongAuthenticationMethods | ? {$_.MethodType -eq "TwoWayVoiceMobile"}).IsDefault}}, @{N="OneWaySMS";E={($MS.StrongAuthenticationMethods | ? {$_.MethodType -eq "OneWaySMS"}).IsDefault}} } $report | export-csv $ExporttoFile -NoTypeInformation
Sample Report
Comments
Post a Comment