azure-pipelines-tasks: [BUG]: ARM template deployment az login fails when using certificate for authentication

New issue checklist

Task name

ARM template deployment

Task version

3.*

Issue Description

Same issue that we had with Azure CLI a few weeks back. ARM template deployment task needs to change the parameter “–password” with “certificate”. Looks like ARM template deployment task utilizes AZ CLI for auth. That’s where the issue is. Please read below the log.

We need this fixed ASAP! This is breaking all production pipelines.

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

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

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

windows-latest

Relevant log output

Log -
2024-12-10T11:57:51.4300005Z [command]C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin\az.cmd" login --service-principal -u *** "--password=D:\a\_temp\spnCert.pem" --tenant {REMOVED} --allow-no-subscriptions"

Full task logs with system.debug enabled

 [REPLACE THIS WITH YOUR INFORMATION] 

Repro steps


About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

@LeftTwixWand - Please understand that what you’re saying partially works since Workload identity Federation doesn’t use the same parameter. I CANNOT use WIF instead of certs since I use a multi tenant app registration and then delegate to N number of clients. WIF only allows 30 at one app regis. MS would need to fix this for Cert based auth. MS already fixed it for Azure CLI task, can’t this be fixed the same way for ARM template deployment task? I’d appreciate a quick response.