Connect to ExchangeOnlineManagement powershell module returns error

KimH 0 Reputation points
2025-04-25T19:04:17.0266667+00:00

Script is called from Workato, and runs from a virtual machine that has exchange online 3.6.0. This was working up until last week.

UnAuthorized

At C:\Program

Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.6.0\netFramework\ExchangeOnlineManagement.psm1:766 char:21

  •                 throw $_.Exception;
    
  •                 ~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (:) [], UnauthorizedAccessException
    • FullyQualifiedErrorId : UnAuthorized

When updating to exchange module 3.7.2 I see this error:

Error Acquiring Token: Unknown Status: Unexpected Error: 0xffffffff80070520 Context: (pii) Tag: 0x21420087 (error code -2147023584) (internal error code 557973639) Unknown Status: Unexpected Error: 0xffffffff80070520 Context: (pii) Tag: 0x21420087 (error code -2147023584) (internal error code 557973639) At C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.7.2\netFramework\ExchangeOnlineManagement.psm1:754 char:21 + throw $_.Exception.InnerException; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [], MsalServiceException + FullyQualifiedErrorId : Unknown Status: Unexpected Error: 0xffffffff80070520 Context: (pii) Tag: 0x21420087 (error code -2147023584) (internal error code 557973639)

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,915 questions
{count} votes

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.