Forum Discussion
Azure automation account script error
Hi
I have an azure automation account and all runbooks are failing. I don't know why.
As a test I only ran this command, and it fails too.
$cred = Get-AutomationPSCredential -Name "Name"
Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline -Credential $cred
This is the job Exception log:
Connecting to remote server outlook.office365.com failed with the following error message : Bad Request For more information, see the about_Remote_Troubleshooting Help topic. (Connecting to remote server outlook.office365.com failed with the following error message : Bad Request For more information, see the about_Remote_Troubleshooting Help topic.)
Any ideas
I've got the same issue.
Check under your "Automation Account / Modules" the module version of "ExchangeOnlineManagement".
It has to be at least V3 - if you still have V2, you'll get this issue - im my case since Aug 10.
At 02:30am runbook was fine then on the next schedule at 10:30am it failed.
Updating the module to v3.2.0 solved my issue.
- chrisvetschCopper Contributor
I've got the same issue.
Check under your "Automation Account / Modules" the module version of "ExchangeOnlineManagement".
It has to be at least V3 - if you still have V2, you'll get this issue - im my case since Aug 10.
At 02:30am runbook was fine then on the next schedule at 10:30am it failed.
Updating the module to v3.2.0 solved my issue. - VirtualTechBrass ContributorHi
I needed to updated the exchange online module in azure