Add support for Azure CLI authentication in addition to Service Principal #160442
Unanswered
dmytrosklyarov
asked this question in
Actions
Replies: 0 comments 2 replies
-
|
Hello @dmytrosklyarov - We are looking into the feasibility of this implementation |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hello @subir0071, thanks for the feedback. Looking forward to have this request prioritized and implemented. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi team,
While reviewing the image generation process (specifically build-image.ps1 in images.CI/linux-and-win), I noticed that the current implementation relies entirely on explicit Service Principal credentials (client_id, client_secret, tenant_id) for authenticating with Azure.
This is reflected in the Packer templates such as ubuntu-22.04.pkr.hcl, where those values are required.
I’d like to propose adding support for Azure CLI-based authentication (use_azure_cli_auth = true), which Packer supports out of the box. This would allow contributors and CI pipelines that already use az login to avoid managing separate SP credentials.
Key benefits:
• Better local development experience (especially for contributors)
• Simplifies credential management in some CI/CD environments
• Still allows fallback to SP-based auth for full control and automation
Suggestion:
• Add a new optional parameter (e.g. use_cli_auth) in the Packer templates and build-image.ps1 script.
• Based on this flag, switch between client_id/client_secret and use_azure_cli_auth = true.
• Default to current behavior for backward compatibility.
Would appreciate feedback from the maintainers on feasibility and interest in this enhancement.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions