Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

What is being addressed

Azure CLI deprecated the --username flag when using az login --identity for managed identity authentication. The correct flag is --client-id.

How is this addressed

  • Replaced username: with client-id: in all az login --identity commands across 8 Porter bundles:
    • Shared services: airlock_notifier, certs, cyclecloud
    • Workspace services: ohdsi
    • User resources: guacamole-azure-export-reviewvm, guacamole-azure-import-reviewvm, guacamole-azure-linuxvm, guacamole-azure-windowsvm
  • Incremented bundle versions (PATCH level) per semantic versioning guidelines
  • Updated CHANGELOG.md with issue reference (#4817)

Before:

- az:
    description: "Login to Azure"
    arguments:
      - login
    flags:
      identity:
      username: ${ bundle.credentials.azure_client_id }

After:

- az:
    description: "Login to Azure"
    arguments:
      - login
    flags:
      identity:
      client-id: ${ bundle.credentials.azure_client_id }

Note: Shell scripts using az login --service-principal --username were not changed as --username remains valid for service principal authentication.

Original prompt

This section details on the original issue you should resolve

<issue_title>az cli uses depreciated --username flag when using --identity in bundles</issue_title>
<issue_description>Azure CLI needs to use az login --identity --client-id <client_id> as per https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli-managed-identity?view=azure-cli-latest, not --username which has been deprecated.</issue_description>

<agent_instructions>Check all porter.yaml files for instances where this flag needs to be updated. The bundle versions will need updating.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

… commands

Co-authored-by: marrobi <17089773+marrobi@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix deprecated --username flag in az cli login command Replace deprecated --username flag with --client-id in az login --identity commands Jan 20, 2026
Copilot AI requested a review from marrobi January 20, 2026 08:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Azure CLI authentication commands across Porter bundles to use the correct --client-id flag instead of the deprecated --username flag when authenticating with managed identities.

Changes:

  • Updated az login --identity commands to use --client-id instead of deprecated --username flag in 8 Porter bundles
  • Incremented bundle versions by a PATCH level following semantic versioning guidelines
  • Updated CHANGELOG.md to document the bug fix

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
templates/shared_services/airlock_notifier/porter.yaml Replaced username: with client-id: in install and upgrade actions; bumped version to 1.0.10
templates/shared_services/certs/porter.yaml Replaced username: with client-id: in install and renew actions; bumped version to 0.7.9
templates/shared_services/cyclecloud/porter.yaml Replaced username: with client-id: in start and stop actions; bumped version to 0.7.4
templates/workspace_services/ohdsi/porter.yaml Replaced username: with client-id: in install and upgrade actions; bumped version to 0.3.5
templates/workspace_services/guacamole/user_resources/guacamole-azure-export-reviewvm/porter.yaml Replaced username: with client-id: in start, stop, and reset_password actions; bumped version to 0.3.5
templates/workspace_services/guacamole/user_resources/guacamole-azure-import-reviewvm/porter.yaml Replaced username: with client-id: in start, stop, and reset_password actions; bumped version to 0.4.4
templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/porter.yaml Replaced username: with client-id: in start, stop, and reset_password actions; bumped version to 1.4.3
templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/porter.yaml Replaced username: with client-id: in start, stop, and reset_password actions; bumped version to 1.4.4
CHANGELOG.md Added entry in BUG FIXES section documenting the deprecation fix

Co-authored-by: marrobi <17089773+marrobi@users.noreply.github.com>
@marrobi
Copy link
Member

marrobi commented Jan 20, 2026

/test-extended

@marrobi marrobi marked this pull request as ready for review January 20, 2026 11:50
@marrobi marrobi requested a review from a team as a code owner January 20, 2026 11:50
@github-actions
Copy link

🤖 pr-bot 🤖

⚠️ When using /test-extended on external PRs, the SHA of the checked commit must be specified

(in response to this comment from @marrobi)

@marrobi
Copy link
Member

marrobi commented Jan 20, 2026

/test-extended e8ed9b5

@github-actions
Copy link

🤖 pr-bot 🤖

🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/21170719648 (with refid 153a815f)

(in response to this comment from @marrobi)

@github-actions
Copy link

github-actions bot commented Jan 20, 2026

Unit Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 8a26ebe.

♻️ This comment has been updated with latest results.

@marrobi
Copy link
Member

marrobi commented Jan 21, 2026

/test-extended 8a26ebe

@github-actions
Copy link

🤖 pr-bot 🤖

🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/21213006566 (with refid 153a815f)

(in response to this comment from @marrobi)

Copy link
Collaborator

@JC-wk JC-wk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@marrobi
Copy link
Member

marrobi commented Jan 21, 2026

/test-force-approve

Tests failing for another reason and this wasn't picked up as wasn't covered by tests.

@github-actions
Copy link

🤖 pr-bot 🤖

✅ Marking tests as complete (for commit 8a26ebe)

(in response to this comment from @marrobi)

@marrobi marrobi merged commit 9b7eb7f into main Jan 21, 2026
14 checks passed
@marrobi marrobi deleted the copilot/update-az-cli-username-flag branch January 21, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

az cli uses depreciated --username flag when using --identity in bundles

5 participants