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"