Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

azure authentication not working with CI/CD

ANKIT MANGLA
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 16, 2024

I am uploading my nodejs project in azure for that I used a yml file but on deploy it gives error no subscription id found for this app id and please use az login to auth.

here is my yml file :

image: atlassian/default-image:2

pipelines:
custom:
azure:
- step:
name: "Build"
script:
- nvm install 12
- npm install
- npm run build
- cd build
- zip -r ../example-$BITBUCKET_BUILD_NUMBER.zip .
artifacts:
- example-*.zip
- step:
name: "Deploy to Azure"
deployment: azure
- pipe: microsoft/azure-web-apps-deploy:1.0.0
variables:
AZURE_APP_ID: $AZURE_APP_ID
AZURE_PASSWORD: $AZURE_PASSWORD
AZURE_TENANT_ID: $AZURE_TENANT_ID
AZURE_RESOURCE_GROUP: $AZURE_RESOURCE_GROUP
AZURE_APP_NAME: $AZURE_APP_NAME
ZIP_FILE: 'example-$BITBUCKET_BUILD_NUMBER.zip'
here is the error code shown:
az login --service-principal --username ef742fcb-f880-4958-98f5-260b8ba0f1 --password DQ.8Q~NCDdjosREDAFDEDwVNAA3NK.4uQxFczd --tenant 6c0e7d7d-d39e-480e-82fa-181c948e37
104
ERROR: No subscriptions found for ef742fcb-f880-4958-98f5-260b8ba0f1.
ERROR: Please run 'az login' to setup account.
113
ERROR: Please run 'az login' to setup account.

1 answer

1 vote
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 17, 2024

@ANKIT MANGLA hi. This error means you provided wrong credentials to authenticate to azure cloud.
Check these variables:

AZURE_APP_ID
AZURE_PASSWORD
AZURE_TENANT_ID


Also maybe you have to set an AZURE_SUBSCRIPTION if you use it?

Regards, Igor

Ankit Mangla
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 17, 2024
  • @Igor Stoyanov  hello I am using free trial version of azure. I app I'd I have provided is the I'd of the app created by the app registration also followed up by the password and tenant I'd
  • Also I tried to pass the subscription id in the code then also it is saying no subscription I'd find in azure cloud but the same I'd is shown in cli of azure portal
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 17, 2024

@Ankit Mangla Try to authorize with your credentials from your local computer to exclude problems with azure login.

Also in the output you could see the generated command:

az login --service-principal --username ef742fcb-f880-4958-98f5-260b8ba0f1 --password DQ.8Q~NCDdjosREDAFDEDwVNAA3NK.4uQxFczd --tenant 6c0e7d7d-d39e-480e-82fa-181c948e37

Also keep in mind that you exposed your credentials. I suggest you to change password.

Regards, Igor

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events