Problem
When creating a Microsoft Exchange Online Connection, the connection fails validation with the following message:
Error code: ErrorAccessDenied, Error: Access to OData is disabled.
Additionally, trying to configure Microsoft Exchange Online workflow actions may result in the following message:
The authorization server encountered an unexpected condition that prevented it from fulfilling the request.
Solution
To allow Automation Cloud to access Exchange Online, run the following command in PowerShell with the Exchange Online PowerShell module:
Set-OrganizationConfig -EwsApplicationAccessPolicy:EnforceAllowList -EwsAllowList:'NAC-ExchangeOnlineConnector/2.1'
Relevant Microsoft documentation can be found below:
Exchange Online PowerShell: https://learn.microsoft.com/en-us/powershell/exchange/connect-to-exchange-online-powershell?view=exchange-ps
Set-OrganizationConfig: https://learn.microsoft.com/en-us/powershell/module/exchange/set-organizationconfig?view=exchange-ps