powershelloffice365exchange-management-shell

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


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


Solution

  • So in the end the problem was indeed on Microsoft's end. I just now managed to successfully make the connection again even though the official ticket/incident (EX281207) is still open.

    Thank you all who contributed to the question, the information helped us conclude that the problem is no on our end and there was also a good workaround for us to use if needed at the time.