Skip to content

[Feature]: Support az CLI (Entra) authentication for Azure DevOps, matching Microsoft's own tooling #17908

Description

@yoyoys

Operating system

macOS

Orca version

1.4.188

Details

Orca authenticates Azure DevOps with a personal access token (ORCA_AZURE_DEVOPS_TOKEN / ORCA_AZURE_DEVOPS_ACCESS_TOKEN). The Settings card does name those variables and explains when the API base URL override is needed, so the setup is discoverable — but it still asks the user to create and manage a PAT, which is the legacy mechanism.

I'd like to propose adding the Azure CLI's Entra login as an authentication path for hosted Azure DevOps, with PAT kept as the fallback.

Why this is the reasonable modern path

Microsoft's own official Azure DevOps MCP server (@azure-devops/mcp) authenticates exactly this way. From its shipped dist/auth.js:

import { AzureCliCredential, ChainedTokenCredential, DefaultAzureCredential } from "@azure/identity";
const scopes = ["499b84ac-1321-427f-aa17-267ca6975798/.default"];

Its README documents --authentication azcli as a supported mode. I verified this live: my MCP client runs it with an empty env — no PAT, no token variable anywhere — and it authenticated against my organization and returned its project list on the strength of az login alone.

That 499b84ac-… GUID is Azure DevOps' fixed application ID, identical for every tenant. It is the same resource an az account get-access-token --resource call asks for, so a client whose user has run az login already has everything it needs.

This also matches how Orca already works elsewhere: GitHub delegates to gh, GitLab to glab. Azure DevOps is the only provider that asks the user to supply a credential directly.

Practical differences

  • No PAT to create, scope, store, or rotate; a developer who has run az login needs no configuration.
  • Entra access tokens are short-lived and refresh automatically, so there is no silent expiry taking Create PR down until someone re-issues a token.
  • Orca stops holding a credential at all — az logout revokes access, and nothing is written to disk.

Scope

Hosted Azure DevOps only (dev.azure.com, *.visualstudio.com). On-prem Azure DevOps Server is not federated with Entra, so it has to stay on the PAT path — Microsoft's own azure-devops CLI extension is Services-only for the same reason.

Status

#12201 implements this: env tokens keep absolute priority, and on-prem never consults az. It is verified end to end against a real organization.

Opening this as a separate issue because #11125 is about Azure Boards as a task provider, which is a different subsystem from source-control authentication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestos:macosIssues affecting macOS

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions