-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not retrieve credential from local cache for service principal ***. Please run 'az login' for this service principal." #688
Comments
The issue affects all azure_rm resource types, not just azure_rm_postgresqlfirewallrule mentioned in the issue description. As the link posted above explains, this issue has arisen because of the change of authentication library from ADAL to MSAL in Azure CLI 2.30: https://docs.microsoft.com/en-us/cli/azure/msal-based-azure-cli More specifically, the issue is seen when the version of Azure CLI installed has a mismatch with the version of the Python azure-cli-core module used with azure.azcollection, as specified in requirements-azure. e.g. Azure CLI <2.30, azure-cli-core <2.30 does work |
related to Azure/azure-cli#19853 Thx @asos-philc -- I went with option 3 and it worked just fine. |
pip install azure-cli-core==2.30 |
I was able to fix the issue in my user account. I have an azure devops agent that runs under another user and it is not working for the other user. I logged in as the az devops agent user and went with option 3 as well but didn't fix the issue even after:
I tried CLI and Credentials file but no dice. Any help here is appreciated! |
kindly ping! |
@dkirrane There is a problem that cannot install ansible and azure-cli at the same time. It is recommended that you use the following way to define credentials, Thank you!
|
SUMMARY
azure_rm_postgresqlfirewallrule
auth_source
cli
no longer workingISSUE TYPE
COMPONENT NAME
azure_rm_postgresqlfirewallrule
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
I suspect this maybe related to GitHub Actions Azure CLI login change: https://stackoverflow.com/questions/69895247/could-not-retrieve-credential-from-local-cache-for-service-principal-when-usin
But workaround posted here doesn't apply to Ansible.
The text was updated successfully, but these errors were encountered: