Get MFA Status of Office 365 Users Using Microsoft Graph PowerShell  

It’s time to say goodbye to ‘Get-MsolUser MFA Status’. Yes! As we all know, Microsoft is planning to deprecate MS Online and Azure AD PowerShell module after 2022. So, it’s time to use the Microsoft Graph PowerShell module to get the MFA status of the Office 365 users in your organization. 

If you are fond of the MS Online module, you can use our earlier script to export the MFA status report. It uses the Get-MsolUser cmdlet and ‘StrongAuthenticationMethods’. You can use this report until Microsoft deprecates it. For those who are excited to use Microsoft Graph to get MFA status, let’s start. 

 

How to Check MFA Status using Microsoft Graph? 

You can view Office 365 users’ MFA status through Microsoft Graph API or Microsoft Graph PowerShell. But retrieving MFA status using MS Graph is different from the Get-MsolUser cmdlet.  

Microsoft Graph does not provide MFA status directly as enabled, enforced, or disabled. Instead, it will show the list of configured authentication methods for a user. You have to conclude the MFA status based on the authentication method. We have documented a list of authentication methods at the bottom of the blog.  

To make it simpler, we have created a PowerShell script by analyzing all the challenges and use cases. This script will help you get MFA status for all users and authentication methods using PowerShell. 

 

Script Download: GetMFAStatusReport.ps1 

 

Script Highlights: 

  • The script exports MFA status for all users. 
  • You can filter results based on MFA status. I.e., you can export MFA enabled/disabled users separately. 
  • Exports report to CSV file 
  • You can filter the result to display Licensed users alone. 
  • You can generate MFA report for sign-in allowed users only. 
  • Shows MFA registration done through Conditional Access and Security Defaults too.
  • Automatically installs Microsoft Graph PowerShell module (if not installed already) upon your confirmation. 

 

Export Office 365 MFA Status Report – Sample Output: 

The exported MFA report contains the following attributes:

  • User Name,
  • UPN,
  • Department,
  • License Status,
  • Sign-in Status,
  • Authentication Methods,
  • MFA Status,
  • MFA Phone,
  • Microsoft Authenticator Configured Device,
  • 3rd Party Authenticator Info,
  • Additional MFA Details. 

Get MFA status PowerShell

 

How to Execute ‘MFA Status Report’ PowerShell Script? 

The script will get MFA status for all Azure AD users by default. You can use the format below to run the script. 

The output file will be stored in the current working directory. 

 

If you want to generate MFA report for multiple tenants, you need to disconnect existing MS Graph session and enter credential of another tenant. To close existing session, run the script with -CreateSession parameter.

 

 

How To Get More Granular MFA Registration Status Report? 

This All-in-One PowerShell script allows you to generate 5+ Microsoft 365 MFA status reports. I have listed the most required use cases below. 

 

Get MFA Status for All Office 365 Users: 

Since ‘Password authentication’ is a primary authentication, it isn’t considered a multi-factor authentication method. To check the MFA registration status of all users, you can run the script as follows.  

By referring to the ‘Authentication Methods’ and ‘MFA Status’ attributes, you can identify the users’ MFA registration status.  

Note: MS Online module cannot list new methods like FIDO2 and Windows Hello authentication. But Microsoft Graph will list the authentication methods from FIDO2 to passwordless authentication. 

 

Get MFA Enabled Users Report: 

To check if MFA is enabled in Office 365, you can generate MFA enabled users report. You can use the MFAEnabled switch parameter to get a list of users with MFA. 

It will show both ‘Strong’ and ‘Weak’ MFA. If you want to know how MFA status is calculated, you can refer to our documentation at the bottom. 

 

Get MFA Disabled Users Report: 

If the Azure AD accounts use only password authentication, it is highly prone to attacks. To identify users without MFA, run the script with –MFADisabled parameter. 

The report will show users without MFA authentication methods like Phone authentication, FIDO2, Windows Hello for Business, and Microsoft Authenticator app. 

 

Identify MFA Status for Licensed Users: 

Instead of generating an MFA report for all users, you can export the MFA registration status for licensed users alone. It will be helpful to filter shared mailboxes and former employees’ accounts. 

The exported report will contain all licensed users and their MFA status. 

 

Export MFA Report for Sign-in Enabled Users: 

Most organizations disable the employee’s account when they leave the org. To get MFA status for sign-in allowed users, execute the script using the – SignInAllowedUsersOnly parameter. 

 

Find Licensed Users without MFA: 

You can combine one or more parameters to generate a more granular MFA Status report. To view MFA disabled licensed users, you can run the script as follows. 

 

Get Sign-in Enabled Users without MFA: 

Signing in without multi-factor authentication leads to account compromise. Identifying sign-in enabled users without MFA is one of the easiest ways to secure your business. To get a list of sign-in enabled users without MFA, execute the script using the following format. 

 

Get Users Registered by Authentication Method: 

To know how many users are registered for each authentication method, open the report with Excel and filter the desired authentication method from the ‘Authentication Methods’ column. In this way, you can get a list of users with FIDO2 authentication, users registered for passwordless authentication, etc. 

 

List of Authentication Methods Supported by Microsoft Graph 

You can refer to the table below to know more about each authentication method. 

  1. PasswordAuthenticationMethod – It is primary default authentication method. 
  2. PhoneAuthenticationMethod – A user can register phone (SMS or Voice call) for authentication. 
  3. FIDO2AuthenticationMethod – User can use FIDO2 security key to sign-in to Microsoft 365. 
  4. MicrosoftAuthenticatorAuthenticationMethod – With the Microsoft Authenticator app, users can authenticate through Android and iOS. 
  5. PasswordlessMicrosoftAuthenticatorAuthenticationMethod (deprecated)– Users can authenticate in a password less way through Microsoft Authenticator app. 
  6. EmailAuthenticationMethod – Email authentication can be used in Self-Service Password Reset (SSPR). 
  7. WindowsHelloForBusinessAuthenticationMethod – Windows uses Windows Hello to authenticate users. It is one of the passwordless authentication methods. 
  8. TemporaryAccessPassAuthenticationMethod – Temporary access pass is a time-limited passcode that is used for authentication. 
  9. SoftwareOathAuthenticationMethod – When a user uses a 3rd party authenticator app or application that supports OATH specification for MFA. 

 

How MFA Status is Calculated? 

Based on the security considerations for the available authentication methods, MFA status is categorized into three classifications – Strong, Weak, and Disabled.  

  • Windows Hello for Business, Microsoft Authenticator app, FIDO2 security key, and Phone authentication – Strong authentication methods.  
  • Since OATH software tokens use 3rd party authenticator application, it is considered weak.  
  • Email Authentication is only used for SSPR. So, it is considered disabled.  
  • Password authentication is a primary authentication. So, users with only Password authentication are considered MFA disabled.  

Note: When a user uses a specific authentication method for the first time, it will be added to the list of authentication methods used by the account. 

I hope this blog will help you get MFA status using Microsoft Graph PowerShell and monitor the authentication methods’ usage in an effective way.