Cannot connect Exchange online with Powershell

Pekka Pekkonen 586 Reputation points
2021-08-27T12:26:06.587+00:00

Hello

I have a problem to connect to Exchange online with a global admin account (MFA enabled).

Here are the errors I get:
1st error
New-ExoPSSession : Processing data from remote server outlook.office365.com failed with the following error message: Th
e request for the Windows Remote Shell with ShellId 4BC388B1-124B-41D9-87B9-42D6BD57990A failed because the shell was n
ot found on the server. Possible causes are: the specified ShellId is incorrect or the shell no longer exists on the se
rver. Provide the correct ShellId or create a new shell and retry the operation. For more information, see the about_Re
mote_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.Exchang
    e.Management.ExoPowershellSnapin.NewExoPSSession

2nd error
New-ExoPSSession : Processing data from remote server outlook.office365.com failed with the following error message: [A
uthZRequestId=f2baaa6c-ce5d-4bbc-aa13-d4457901547f][FailureCategory=AuthZ-CmdletAccessDeniedException] The user "EURP19
0A003.PROD.OUTLOOK.COM/Microsoft Exchange Hosted Organizations/xxx.onmicrosoft.com/xxx" isn't assigne
d 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.Exchang
    e.Management.ExoPowershellSnapin.NewExoPSSession

127128-image.png

So far I have tested with other network and other computer with same kind results. I have the problem with several tenants and it has lasted at least a week.

One work around is that I can create a new global admin. With that it seems to work normally. But would there be possibilities to retain the original admin access?

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,171 questions
{count} votes

Accepted answer
  1. Pekka Pekkonen 586 Reputation points
    2021-08-30T13:36:27.72+00:00

    Hello

    Thank you @Anonymous for the response. Here are further details.

    It should be cloud-only and non-multi-region tenant. I get the second error over and over again, so trying another time does not seem to help either.

    I also tried to remove GA rights and add them again but the error still keeps coming.

    I hope these clarified the issue.

    [Edit: ZhengqiLou-MSFT provided the solution in the comments]

    Regards,
    Pekkapek

    1 person found this answer helpful.

5 additional answers

Sort by: Most helpful
  1. Venkat Vaddi 6 Reputation points
    2022-08-06T05:18:03.14+00:00

    The issue got fixed for me following the below steps:

    1. Open Registry Editor
    2. Navigate to the path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Cryptography\Configuration\Local\SSL\00010003
    3. Backup the key
    4. Under Functions, remove the following signature suites from the list:
      RSAE-PSS/SHA256
      RSAE-PSS/SHA384
      RSAE-PSS/SHA512
    5. Reboot the computer
    6. After the reboot, the issue will get fixed.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.