SOLVED

Connect to Exchange Online PowerShell using MFA

Iron Contributor

Hi,

 

I'm trying to follow the instructions on this page: https://technet.microsoft.com/en-us/library/mt775114(v=exchg.160).aspx

 

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:

 

ERROR SUMMARY
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.

10 Replies
best response confirmed by Jason Rhodes (Iron Contributor)
Solution

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 user@domain.com

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.

messages3.png

Thanks ALOT! 
Have been looking every where to find a solution, and then just logon and download from IE fixed everything.. GG played Microsoft... :\ 

Not even working in Edge Beta (Chromium browser Edge), that should have old IE support. :( 

 

But finally happy that it works for me. :) 

1 best response

Accepted Solutions
best response confirmed by Jason Rhodes (Iron Contributor)
Solution

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.

View solution in original post