1 minute reading time (237 words)

SOLVED: Azure PowerShell Runbook error "Failed UnAuthorized" (incorrect permissions)

 SOLVED: Azure Runbook error "Failed UnAuthorized" when trying to connect to Exchange Online. Fixed by assigning correct permissions for connecting to Exchange Online PowerShell

Problem: Azure PowerShell Runbook error - Failed UnAuthorized

Error when trying to connect to Exchange Online from an Azure Automation Account PowerShell runbook

Failed
UnAuthorized (UnAuthorized)

Solution: Check Azure Service Principal permissions are correct

To connect to Exchange Online from an Azure PowerShell runbook you will need to set the following permissions:

  • Exchange ManageAsApp 
  • Exchange Administrator role
  • MS Graph Permissions 

The permissions will need to be assigned to either the Azure AD App registration or System assigned Managed Identity that you are using to connect to Exchange Online

See these guides for more detailed instructions:


Related Posts

 

Comments

No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Saturday, 23 September 2023