Updated 3 days ago
Posted on
August 9, 2022

Connect to Exchange Online PowerShell with MFA

Summary
Microsoft is retiring the Exchange Online PowerShell V1 module and Remote PowerShell protocol, requiring admins to migrate to the EXO V3 module for connecting to Exchange Online with MFA. The V3 module uses modern authentication, supports both MFA and non-MFA accounts through the Connect-ExchangeOnline cmdlet, eliminates the WinRM dependency, and includes REST API-based cmdlets optimized for bulk data retrieval.

As per MC407050, Microsoft is going to retire the “Connect to Exchange Online PowerShell with MFA module” (i.e., EXO V1 module) on Dec 31, 2022. And the support ends on Aug 31, 2022. Recently Microsoft made another announcement regarding deprecation of Remote PowerShell (RPS) in Exchange Online. Starting from June 1, 2023, Microsoft will begin phasing out the use of Remote PowerShell (RPS) for Exchange Online, with a complete cut-off on July 1, 2023. So, admins should move to EXO V3 module to connect to Exchange Online PowerShell with multi-factor authentication.

Why We Should Switch from EXO V1 & V2 Module?

Earlier, admins should install the Exchange Online remote PowerShell module (EXO V1) and use the PowerShell cmdlet Connect-EXOPSSession to connect to Exchange Online PowerShell with MFA. This EXO V1 module uses basic authentication to connect to EXO. Due to basic authentication deprecation, Microsoft has introduced the EXO V2 module with improved security and data retrieval speed. But EXO V2 module uses RPS, which is going to expire in June 2023. So, admins must install the newer version or upgrade their existing Exchange Online PowerShell module.

Connect to Exchange Online PowerShell with MFA:

To connect to Exchange Online PowerShell with MFA, you need to install the Exchange Online PowerShell V3 module. With this module, you can create a PowerShell session with both MFA and non-MFA accounts using the Connect-ExchangeOnline cmdlet.

Additionally, the Exchange Online PowerShell V3 module uses modern authentication and helps to create unattended scripts to automate the Exchange Online tasks.

To download and install the EXO V3 module & connect to Exchange Online PowerShell, you can use the script below.

If you have already installed the EXO V3 module, you can use the “Connect-ExchangeOnline” cmdlet directly to create a PowerShell session with MFA and non-MFA accounts. For MFA accounts, it will prompt for additional authentication. After the verification, you can access Exchange Online data and Microsoft 365 audit logs.

Advantages of Using EXO V3 Module:

  • It uses modern authentication to connect to Exchange Online PowerShell.
  • A single cmdlet “Connect-ExchangeOnline” is used to connect to EXO with both MFA and non-MFA accounts.
  • It doesn’t require WinRM basic authentication to be enabled.
  • Helps to automate EXO PowerShell login with MFA. i.e., unattended scripts.
  • Contains REST API based cmdlets.
  • Provides exclusive cmdlets that are optimized for bulk data retrieval.

If you are using the Exchange Online Remote PowerShell module, it’s time to switch to the EXO V3 module. Also, you can update your existing scripts to adopt the EXO V3 module. Happy Scripting!

About the author

O365Reports Content Team is a specialized group of domain experts across Microsoft Entra, Exchange, SharePoint, Teams, Intune, Active Directory and security. Their work focuses on administration, governance, and configuration guidance that reflects real environment conditions. This helps IT teams apply settings correctly and maintain consistent operational control.

Previous Article

How to Sign up for Microsoft Developer Program for Free

Next Article

Enable Self-Service Password Reset to Reduce Help Desk Calls