Describe the bug
In the update to use managed identities, if the subscription resides in an environment that is not the Azure public cloud (i.e. azure.com) then the Connect-AzAccount will fail due to a cross cloud request.
For example, I updated the script from 3.6 to 3.8. Our cloud is AzureUSGovernment. (azure.us)
Connect-AzAccount : ClientCertificateCredential authentication failed: AADSTS900382: Confidential Client is not supported in Cross Cloud request.
To Reproduce
Run the workbook in a cloud that is not the default public cloud with a system or user-managed identity.
Expected behavior
Should work as expected, but you will need to specify environment.
Additional context
I will submit a PR shortly to resolve this issue.
Describe the bug In the update to use managed identities, if the subscription resides in an environment that is not the Azure public cloud (i.e. azure.com) then the
Connect-AzAccount
will fail due to a cross cloud request.For example, I updated the script from 3.6 to 3.8. Our cloud is AzureUSGovernment. (azure.us)
Connect-AzAccount : ClientCertificateCredential authentication failed: AADSTS900382: Confidential Client is not supported in Cross Cloud request.
To Reproduce Run the workbook in a cloud that is not the default public cloud with a system or user-managed identity.
Expected behavior Should work as expected, but you will need to specify environment.
Additional context I will submit a PR shortly to resolve this issue.