Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suddenly can't connect to Exchange Online via EXO v2 PS module [closed]

I've been successfully using PowerShell and Exchange Online Management module for a long time. First I used the original version and lately I've been using the EXO v2 module. I'm also using MFA and a Global Admin account. We do not use any hybrid environments.

Today suddenly when I tried to connect it just gives me this error (I replaced some ID parts with ####):

New-ExoPSSession : Processing data from remote server outlook.office365.com failed with the following error message: [AuthZRequestId=####][FailureCategory=AuthZ-CmdletAccessDeniedException] The user "EURPR02A005.PROD.OUTLOOK.COM/Microsoft Exchange Hosted Organizations/####" isn't assigned to any management roles. For more information, see the about_Remote_Troubleshooting Help topic. At C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\2.0.5\netFramework\ExchangeOnlineManagement.psm1:475 char:30

  • ... PSSession = New-ExoPSSession -ExchangeEnvironmentName $ExchangeEnviro ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : ResourceUnavailable: (:) [New-ExoPSSession], PSRemotingTransportException
    • FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException,Microsoft.Exchange.Management.ExoPowershellSnapin.NewExoPSSession

Also like I said, I'm using a global admin account that has worked like a dream until today and no changes made by me to any roles. The command I've been using to connect is Connect-ExchangeOnline -UserPrincipalName #### -ShowProgress $true, where #### is my global admin account. After that I type in the password and accept the MFA notification on my phone. Then it gives the error.

What might be wrong? I'm grateful for any help regarding this problem, thank you!

EDIT: It seems many have the same problem at the moment so it could be on Microsoft's end. Thank you all for your answers this far and let's see if Microsoft gets it fixed. I have also opened a ticket with Microsoft but haven't gotten any real solution or information on it yet.

EDIT 2: The problem was on Microsoft's end and it is being fixed (EX280152) or might already be fixed for some (like our organization). I also made this edit as an answer for people who might still come reading about this problem.

Kind regards, Tenttu

like image 528
Tenttu Avatar asked Aug 23 '21 08:08

Tenttu


People also ask

How do I connect to Exchange Online V2?

Connect to Exchange Online PowerShell V2 We recommend to enable MFA (Multi-Factor Authentication) on the accounts. Connect with your admin account to Exchange Online. Run the Connect-ExchangeOnline cmdlet. In the sign-in window that opens, enter your password, and then click Sign in.

How do I connect to Exchange PowerShell online?

You need to open the URL in a browser on any computer, and then enter the unique code. After you complete the login in the web browser, the session in the Powershell 7 window is authenticated via the regular Azure AD authentication flow, and the Exchange Online cmdlets are imported after few seconds.

How do I download Microsoft Exchange Online PowerShell module?

To install the EXO V2 module for the first time, complete the following steps: Install or update the PowerShellGet module as described in Installing PowerShellGet. Close and re-open the Windows PowerShell window. Now you can use the Install-Module cmdlet to install the EXO V2 module from the PowerShell Gallery.


2 Answers

This workaround seems to be working fine in the meantime.

$SessionOption = New-PSSessionOption -Culture "en-US"
Connect-ExchangeOnline -Credential $Credential -PSSessionOption $SessionOption
like image 57
Morten Avatar answered Oct 17 '22 23:10

Morten


We have the same problem in our tenant. But we also have problems with using the Exchange Online Console (Classic), if we navigate to "mailboxes" (or in our language "postlåda") we get an blank site.

And problems with OWA, there are missing links and button for all kind of settings.

The problem seems to related to what language you are running. If we change the prefereed language to english instead of swedish, then OWA is running fine and the Exchange Online Console.

But for the powersshell issue, i havent found a work around for this yet.

There is a ticket for this problem at Microsoft support, i think its offical published in the Office 365 portal

like image 40
Daniel Blomqvist Avatar answered Oct 17 '22 23:10

Daniel Blomqvist