Skip to content
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

[Question]: Issue with the Federate Credential login on Azure Cli task #19878

Open
1 of 4 tasks
jasidhu opened this issue May 16, 2024 · 6 comments
Open
1 of 4 tasks

[Question]: Issue with the Federate Credential login on Azure Cli task #19878

jasidhu opened this issue May 16, 2024 · 6 comments

Comments

@jasidhu
Copy link

jasidhu commented May 16, 2024

Task name

Azure CLI

Task version

2.239.3

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

Azure DevOps Server (Please specify exact version in the textbox below)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows

Question

We are getting following error when trying to run az login using the service principal and Federate Credential.

[command]C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin\az.cmd" login --service-principal -u *** --tenant {OurTenantId} --allow-no-subscriptions --federated-token ***"

2024-05-15T20:47:16.2950443Z Error: Error building ARM Config: Authenticating using the Azure CLI is only supported as a User (not a Service Principal).
2024-05-15T20:47:16.2950869Z 
2024-05-15T20:47:16.2951508Z To authenticate to Azure using a Service Principal, you can use the separate 'Authenticate using a Service Principal'
2024-05-15T20:47:16.2952047Z auth method - instructions for which can be found here: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/service_principal_client_secret
2024-05-15T20:47:16.2952264Z 
2024-05-15T20:47:16.2952449Z Alternatively you can authenticate using the Azure CLI by using a User Account.

Can you please provide some guidance how to resolve this issue?
@v-bsanthanak
Copy link
Contributor

@jasidhu Please share the complete debug logs for further investigation.

@jasidhu
Copy link
Author

jasidhu commented May 16, 2024

@v-bsanthanak I have attached the log file below.

tasklog_28.log

@v-bsanthanak
Copy link
Contributor

@jasidhu Attached logs are not the debug logs. Please set system.debug - true and share the complete logs.

@jasidhu
Copy link
Author

jasidhu commented May 17, 2024

@v-bsanthanak Attaching the debug logs.

tasklog.log

@jasidhu Attached logs are not the debug logs. Please set system.debug - true and share the complete logs.

@v-schhabra v-schhabra added the Area:RM RM task team label May 19, 2024
@v-schhabra
Copy link
Contributor

@jasidhu We are checking on the issue above and will share the updates soon.

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

No branches or pull requests

3 participants