Find plugins

Azure Credentials1.2Minimum Jenkins requirement: 1.625.3ID: azure-credentials

Installs: 452
Last released: 3 months ago
Arjun Roy Chaudhuri
Claudiu Guiman

Azure Credentials Plugin

This plugin allows you to store Service Principal credentials in Jenkins.

Refer to

For Developers

Getting an iterator to all SYSTEM owned Azure Credentials

CredentialsProvider.lookupCredentials(AzureCredentials.class, null, ACL.SYSTEM, Collections.<DomainRequirement>emptyList())

Using the credentials to login using the Java Azure SDK

ServicePrincipal servicePrincipal = AzureCredentials.getServicePrincipal("<credentials_id>");
Azure azClient = Azure.authenticate(new ApplicationTokenCredentials(
                new AzureEnvironment(

Version 1.2 (June 19, 2017)

  • Improve credential creation experience:
    • Change subscription ID, client ID and OAuth Endpoint from secret to plain text.
    • Give OAuth Endpoint a default value to make it easier to compose from tenant ID.
  • Add a custom binding for AzureCredentials so that you can use Azure service principal in Credentials Binding plugin.
    Now in a Jenkins pipeline you can retrieve Azure service principal and use it in Azure CLI using the following code:

    withCredentials([azureServicePrincipal('my service principal')]) {
      sh 'az login --service-principal -u $AZURE_CLIENT_ID -p $AZURE_CLIENT_SECRET -t $AZURE_TENANT_ID'

    You can also use Azure service principal in freestyle project by checking "Use secret text(s) or file(s)".

Version 1.1 (June 2, 2017)

  • Bug fix: fix an issue that tenant is corrupted after update an existing credential.

Version 1.0 (March 7, 2017)

  • Initial release
ArchivesGet past versions
This plugin has no labels