Skip to content

Remove conditional Azure login steps and simplify to single Federated Credentials auth #240

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

Merged
merged 2 commits into from
Jul 25, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 24, 2025

Simplified Azure authentication in deployment workflows by removing conditionals and consolidating to a single login step using Federated Credentials.

Changes Made

azure-dev.yaml:

  • Removed if: ${{ env.AZURE_CLIENT_ID != '' }} conditional from the Azure login step
  • Login step now executes unconditionally using Federated Credentials

evaluate.yaml:

  • Removed if: ${{ env.AZURE_CLIENT_ID != '' }} conditional from the azd login step
  • Removed the azure/login@v2 action that used Client Credentials
  • Removed the dependent "Set az account" step
  • Now has a single, unconditional login step using Federated Credentials

Both workflow files now have exactly the login format specified in the issue:

- name: Log in with Azure (Federated Credentials)
  run: |
    azd auth login `
      --client-id "$Env:AZURE_CLIENT_ID" `
      --federated-credential-provider "github" `
      --tenant-id "$Env:AZURE_TENANT_ID"
  shell: pwsh

Benefits

  • Simplifies workflow logic by removing conditionals
  • Reduces complexity and potential failure points
  • Ensures consistent authentication method across workflows
  • Follows current best practices for Azure authentication in GitHub Actions

Fixes #239.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

… Credentials auth

Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Remove conditional from Azure login step in deployment workflow Remove conditional Azure login steps and simplify to single Federated Credentials auth Jul 24, 2025
@Copilot Copilot AI requested a review from pamelafox July 24, 2025 20:21
Copilot finished work on behalf of pamelafox July 24, 2025 20:21
@pamelafox pamelafox marked this pull request as ready for review July 25, 2025 05:49
@pamelafox pamelafox merged commit 4922e20 into main Jul 25, 2025
2 checks passed
@pamelafox pamelafox deleted the copilot/fix-239 branch July 25, 2025 05:49
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.

Remove conditional from Azure login step in deployment workflow
2 participants