Connecting Exchange online PowerShell with MFA enabled Admin Account

Introduction

Multi Factor Authentication (MFA) help safeguard application and data access via a range verification methods that includes phone call, text, app verification etc. Microsoft introduced MFA for Office 365 in 2014 that help administrators to secure corporate information in Office 365 by enforcing a second factor authentication. Connecting with Exchange online PowerShell with MFA enabled admin account is not supported with standard PowerShell module.

It’s highly recommended to configure Multi Factor Authentication (MFA) for all users and admin accounts in Office 365.

Connecting Exchange online PowerShell with MFA enabled admin account requires you to download and install Exchange Online Remote PowerShell module that support MFA.

Install MFA Enabled Exchange Online Remote PowerShell Module steps should be performed in Internet Explorer otherwise you will receive an error message that says “Application can’t be started“.

Install MFA Enabled Exchange Online Remote PowerShell Module

To connect exchange online using MFA enabled admin account, you need to install MFA enabled exchange online remote powershell module that can be downloaded from Exchange online admin center in Office 365.

  • Login to Office 365 using global admin credentials.
  • Navigate to Admin > Admin Centers > Exchange.

Connecting Exchange online PowerShell with MFA enabled Admin Account

  • In Exchange Admin Center, Navigate to Hybrid and Click Configure under “The Exchange online PowerShell Module supports multi-factor authentication. “

Connecting Exchange online PowerShell with MFA enabled Admin Account

  • The Wizard will launch application install process, Click on Install.

Connecting Exchange online PowerShell with MFA enabled Admin Account

  • Wait for the application installation process to complete.

Connecting Exchange online PowerShell with MFA enabled Admin Account

  • Once the Installation process is completed, it will launch Exchange Online PowerShell Module that supports MFA.

Connecting Exchange online PowerShell with MFA enabled Admin AccountOnce the process of installing MFA Enabled Exchange online remote PowerShell module, the next step is to connect with Exchange online PowerShell using MFA enabled admin account.

Connecting Exchange online PowerShell with MFA enabled Admin Account

Connecting Exchange online powershell with MFA enabled admin account requires you to perform the following steps.

  • Run the following cmdlets to connect with Exchange Online PowerShell.

C:\> Connect-EXOPSSession -Username <user@domain.onmicrosoft.com>

Connecting Exchange online PowerShell with MFA enabled Admin Account

  • When prompted, Enter your global admin credentials.

Connecting Exchange online PowerShell with MFA enabled Admin Account

  • Once user credentials are verified, you will be redirected towards MFA verification.

I have setup MFA to use verification code from mobile app.

Connecting Exchange online PowerShell with MFA enabled Admin Account

  • Once you verify the multi-factor authentication, Exchange online remote powershell module will start loading the remote session.Connecting Exchange online PowerShell with MFA enabled Admin Account
  • Once the Remote Session is loaded, you can perform tasks related to Exchange online.

Connecting Exchange online PowerShell with MFA enabled Admin AccountConclusion

Multi-Factor Authentication help secure access to corporate environment and it’s highly recommended to set up MFA for all users and admin accounts. In this blog post, we review the process to access Exchange Online PowerShell after the admin account is setup for MFA. Connecting Exchange online PowerShell with MFA enabled admin account will ensure the security of your environment and help administrators perform their day to day tasks using PowerShell.