Connect-ExchangeOnline suddenly stopped working

Djordje Novakovic 626 Reputation points
2023-11-16T10:54:46.5166667+00:00

Hi,

we use hybrid workers in our environment and Connect-ExchangeOnline suddenly stopped working yesterday.

Runbooks fail when trying to connect to Exchange.

Error: Module could not be correctly formed. Please run Connect-ExchangeOnline again.

We use module ExchangeOnlineManagement version 3.4.0

Also tried connection directly from hybrid worker machine:

User's image

Microsoft Exchange Online
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,578 questions
{count} votes

Accepted answer
  1. Yuki Sun-MSFT 41,146 Reputation points Microsoft Vendor
    2023-11-17T07:24:23.6566667+00:00

    We tried different scenarios...at the end this is workaround for us: App registration with Exchange role, we will not use account. As described here https://learn.microsoft.com/en-us/powershell/exchange/app-only-auth-powershell-v2?view=exchange-ps

    Hi @Djordje Novakovic ,

    Great to know that you've already found the workaround and thanks for sharing it 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 : )


    [Connect-ExchangeOnline suddenly stopped working]

    Issue Symptom:

    "we use hybrid workers in our environment and Connect-ExchangeOnline suddenly stopped working yesterday.

    Runbooks fail when trying to connect to Exchange.

    Error: Module could not be correctly formed. Please run Connect-ExchangeOnline again."

    Workaround:

    "App registration with Exchange role, we will not use account. As described here https://learn.microsoft.com/en-us/powershell/exchange/app-only-auth-powershell-v2?view=exchange-ps"

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Djordje Novakovic 626 Reputation points
    2023-11-17T07:09:59.84+00:00

    We tried different scenarios...at the end this is workaround for us:

    App registration with Exchange role, we will not use account. As described here https://learn.microsoft.com/en-us/powershell/exchange/app-only-auth-powershell-v2?view=exchange-ps

    1 person found this answer helpful.
    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.