# ERROR: Please run ‘az login’ to setup account

**URL:** https://community.jenkins.io/t/error-please-run-az-login-to-setup-account/7675
**Category:** Ask a question
**Tags:** question, sig-infra
**Created:** [May 29, 2023, 9:42am UTC](https://community.jenkins.io/t/error-please-run-az-login-to-setup-account/7675 "2023-05-29T09:42:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![runity77](https://avatars.discourse-cdn.com/v4/letter/r/e19adc/32.png) [@runity77](https://community.jenkins.io/u/runity77)
#### Post date: [May 29, 2023, 9:42am UTC](https://community.jenkins.io/t/error-please-run-az-login-to-setup-account/7675/1 "2023-05-29T09:42:12Z")

</div>

Hello Team,

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

```auto
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,

Rahul

---

<div class="post-metadata">

### Author: ![smerle33](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/smerle33/32/991_2.png) [@smerle33](https://community.jenkins.io/u/smerle33)
#### Post date: [May 29, 2023, 10:04am UTC](https://community.jenkins.io/t/error-please-run-az-login-to-setup-account/7675/2 "2023-05-29T10:04:52Z")

</div>

Hi Rahul,

not sure that I will be of any help but I add the same problem here and solved it by using the same agent for the sh steps :  
[https://github.com/jenkins-infra/kubernetes-management/blob/06862f5b12f26e3e26383b5f45c6f225deaf599c/Jenkinsfile\_updatecli#L36-L39](https://github.com/jenkins-infra/kubernetes-management/blob/06862f5b12f26e3e26383b5f45c6f225deaf599c/Jenkinsfile_updatecli#L36-L39)

(for us the updatecli process was dealt with by a shared library that was spawning a new agent … so the az login was kind of lost)

Good luck,  
Stéphane
