Suddenly unable to connect to Exchange Online via Powershell

Tomasz Kasinski 56 Reputation points
2023-03-23T13:50:06.5133333+00:00

Hi,

Suddenly (started on 13 of March) I can't connect to the ExchangeOnline via Powershell.

With no changes to the infrastructure I started getting the following error. Could you suggest troubleshooting steps, please?

An error occurred while sending the request.
At C:\Program 
Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.1.0\netFramework\ExchangeOnlineManagement.psm1:729 char:21
+                     throw $_.Exception.InnerException;
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], HttpRequestException
    + FullyQualifiedErrorId : An error occurred while sending the request.
Microsoft Exchange Online
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,332 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jarvis Sun-MSFT 10,186 Reputation points Microsoft Vendor
    2023-03-30T05:59:54.4766667+00:00

    Hi @Tomasz Kasinski ,

     

    “Thanks for insight. It turned out it is one of those hundreds unknown Microsoft errors. I have deleted my Windows profile and re-created a new one and all errors are gone. As usual not the most elegant way but we used to it when it comes to the Microsoft products 😃”

     

    Glad to see that your issue had already been resolved and thanks for sharing the solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution in case you'd like to "Accept" the answer.

     

     

     

    [ Suddenly unable to connect to Exchange Online via Powershell]

     

    Issue Symptom:

    Suddenly (started on 13 of March) I can't connect to the ExchangeOnline via Powershell.

     

    Solution:

    “I have deleted my Windows profile and re-created a new one and all errors are gone.”

     

    Best Regards,

    Jarvis Sun

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Jarvis Sun-MSFT 10,186 Reputation points Microsoft Vendor
    2023-03-24T08:06:22.38+00:00

    Hi @Tomasz Kasinski ,

    Based on your description, we have the following suggestions to troubleshoot our issue.

      1. Please confirm whether other administrator accounts can connect. Or whether it is feasible to use other machines to connect.
    1. If other admin accounts can connect normally, it is recommended to use the following cmdlet to view the remote PowerShell access status for your account.
      Get-User -Identity "<UserIdentity>" | Format-List RemotePowerShellEnabled
    
    
    1. If none of the above works, check the service health status on the M365 Admin Center and see if there’s any potentially related advisory.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.