Skip to content

az devops command says I need to sign in right after I signed in #31634

@haileymck

Description

@haileymck

Describe the bug

  1. login with: az login --scope https://graph.microsoft.com//.default --tenant [TENANT-ID]
  2. run az devops service-endpoint azurerm create --name [NAME] --azure-rm-subscription-id [SUBSCRIPTION-ID] --azure-rm-subscription-name [SUBSCRIPTION-NAME] --azure-rm-tenant-id [TENANT-ID] --azure-rm-service-principal-id [SERVICE-PRINCIPAL-ID]

and see
Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials. Please see https://aka.ms/azure-devops-cli-auth for more information.

but, I just logged in... this reproduces reliably. I want to use AAD/MSA identity and not PAT

Related command

az devops service-endpoint azurerm create --name [NAME] --azure-rm-subscription-id [SUBSCRIPTION-ID] --azure-rm-subscription-name [SUBSCRIPTION-NAME] --azure-rm-tenant-id [TENANT-ID] --azure-rm-service-principal-id [SERVICE-PRINCIPAL-ID]

Errors

Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials. Please see https://aka.ms/azure-devops-cli-auth for more information.

Issue script & Debug output

n/a

Expected behavior

allows me to complete this command.

Environment Summary

azure-cli 2.74.0

core 2.74.0
telemetry 1.1.0

Extensions:
azure-devops 1.0.1

Dependencies:
msal 1.32.3
azure-mgmt-resource 23.3.0

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users\hmckelvie.azure'
Extensions directory 'C:\Users\hmckelvie.azure\cliextensions'

Python (Windows) 3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botDevOpsPossible-SolutionService AttentionThis issue is responsible by Azure service team.Similar-IssuebugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions