ERROR: Please run 'az login' to setup account

Hello Team,

I’m getting the below error while creating resources in Azure using terraform with Jenkins Pipeline

Error building ARM Config: obtain subscription() from Azure CLI: parsing json result from the Azure CLI: waiting for the Azure CLI: exit status 1: ERROR: Please run 'az login' to setup account.

The Azure_Credentials variable under Jenkins credentials shows me as successfully verified.

I’m able to run Terraform Init and Plan locally on RHEL 9 Box.

Kindly Help,


Hello @runity77 and welcome to this community :wave:

Are you using the correct Azure credentials in your Jenkins pipeline?

Thanks @poddingue . Yes. Indeed, I’m pretty sure the Azure credentials are correctly defined under Jenkins credentials. It shows me as Successfully verified.

1 Like

I don’t know this plugin.
Do you have to install the Azure CLI on the Jenkins agent for it to work?

@poddingue I have the Azure CLI Plugin in the Installed Plugins section of Jenkins.

Attached below are Snips @poddingue

1 Like

@poddingue Any Suggestions for the same?


Thanks Rahul.
As I wrote before, I don’t know this plugin, so I could only give you vague hints, sorry about that.
In the plugin documentation I read you have to install the Azure CLI itself on the agent.
Did you do that?

Thanks @poddingue . The Azure CLI Plugin is already installed in Jenkins Plugin Manager. When you say itself on agent meaning Rhel 9 Box? In Rhel 9 Box as well AZURE CLI Installed.

1 Like

@poddingue Do you know any expert for Azure Jenkins here? As we cant log a support ticket to the Jenkins team.

Yes, that’s what I meant Rahul. :pray:
If you think that’s a bug and not an installation issue on your side, feel free to open an issue here: Issues · jenkinsci/azure-cli-plugin · GitHub

Thanks @poddingue Issue Logged Now