Azure automation account Hybrid Worker - failed to connect to MSI
Charles Thivierge
4,141
Reputation points
Hi,
I want to convert my PS runbook to Azure CLI and it has to run on a Hybrid Worker.
The PS login is like this
$AzureContext = (Connect-AzAccount -Identity).context
Now, with Azure CLI, i suppose it's the following...
$AzureContextcli = (az login --identity | convertfrom-json)
But i receive the following error:
ERROR: Failed to connect to MSI. Please make sure MSI is configured correctly.
Get Token request returned: <Response [401]>
But if i execute in Azure (not on the hybrid worker), it works well
On the hybrid worker, the az cli is installed (2.63.0)
Any idea ?
Sign in to answer