Connect to Exchange Online PowerShell using MFA

Frequent Contributor



I'm trying to follow the instructions on this page:


which all seem pretty easy to follow. I'm on a brand new install of Windows 10 Pro, and when I try to run the file I download from Exchange Admin I get the error in the image attached.


I've tried this on a few Win 10 Pro PC's, some brand new some a few months old, I get the same issue.


What's the correct way to overcome this so I can install?


This is the error that's in the log file:


Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of E:\Microsoft.Online.CSE.PSModule.Client.application resulted in exception. Following failure messages were detected:
+ Deployment and application do not have matching security zones.

7 Replies

That's the joy of running those click-once apps...


Try re-donwloading/installing it via IE, see if it makes a difference. If it still doesnt work, you probably have some restrictions set on the IE zones that prevents the app from running. Running .Net code needs to be enabled for example.


Thanks for that @Vasil Michev. I read the instructions very cleary and at no stage did they stipulate that it had to be downloaded / run via IE. As soon as I did that it worked perfectly, and I was able to login with my MFA enabled account.


I assume this is the only PowerShell app I can use for this purpose and I can't now use my other PowerShell ISE for MFA also?

omg! I was strugling with exatly the same thing today.. strange that it does not work with other browsers.

Anyhow! i got the module now and im happy :)

To use MFA PowerShell in ISE you could try the following. 

- download and install the MFA PowerShell from the Exchange Online Admin Center (hybrid tab)

- then run the following in ISE whenever you connect 

$CreateEXOPSSession = (Get-ChildItem -Path $env:userprofile -Filter CreateExoPSSession.ps1 -Recurse -ErrorAction SilentlyContinue -Force | Select -Last 1).DirectoryName

. "$CreateEXOPSSession\CreateExoPSSession.ps1"

- this will replicate whatever happens in the MFA PowerShell in ISE 

- Connect via: 

Connect-EXOPSSession -UserPrincipalName

The problem is in the first step, download and install. Indeed *only* possible using IE.

Sigh... Thanks for your answer @Vasil Michev 

Thanks @Vasil Michev . You saved the day.

Yes ,right.

Even if I download file from chrome, it cannot work then it shows error like below, Message.png

But when I download it from internet explorer , it can show message then you click install button.Message2.png

Then you can see it like this.


Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
38 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies