Apisero is now part of NTT DATA - Learn more.

Close this search box.

Connected App For Azure CI/CD

Author: Kishori Patil

  • For authentication you can use Anypoint platform credentials but instead of storing your anypoint credentials you can make use of connected apps. Connected apps help users delegate their access without sharing sensitive credentials or giving full control of their accounts to third parties. The Connected Apps feature enables to use secure authentication protocols and control an app’s access to user data. In this blog we will see how to create connected apps for your CI/CD implementation and how to use connected apps to configure your settings.xml and pom.xml.

Create Connected App for CI/CD at Anypoint platform:

  1. To create connected apps go to Anypoint platform > Access management > Connected apps > Create app. 

  1. Give name to your App and Select App acts on its own behalf (client credentials).

  1. Now we will also have to select scopes for this application. For CI/CD ,we need an Exchange Administrator or the Exchange Contributor scope as well as we need access to a runtime manager to create and read an application and manage the settings of the application deployed. You can give permission to specific environments as per your requirements.

  1. Then click on Save and copy the Client ID and Client secret of the connected application as for connected application authentication we need them.

Setup pom.xml:
  1. Add below plugin in build tag of pom.xml of your project for CloudHub deployment using connected apps:






















<mule.env>${mule.env}</mule.env> <mule.encryptionKey>${mule.encryptionKey}</mule.encryptionKey> <anypoint.platform.client_id>${env.client.id}</anypoint.platform.client_id> <anypoint.platform.client_secret>${env.client.secret}</anypoint.platform.client_secret> <anypoint.platform.config.analytics.agent.enabled>${anypoint.monitoring}</anypoint.platform.config.analytics.agent.enabled>






Setup settings.xml:
  1. In settings.xml ,add the following to the servers section of your settings.xml . One for your nexus repo and one to use connected application authentication.











  1. Then make a mule profile and add following section in repository tag and replace the ORGANIZATION_ID with your Organization ID:



<name>Exchange Repository</name>
















  1. Also add mule public, release ,release-ee and public repositories in Standard repository and also in pluginRepository
Upload settings.xml in Azure:
  1. Login to your azure account and goto project > pipelines > library . Click on secure files > +secure file.

  1. Browse the file and add that file as a secure file in the library.

Reference Links:
  1. https://docs.mulesoft.com/mule-runtime/3.5/configuring-maven-pom-files-and-settings
  2. https://docs.mulesoft.com/access-management/connected-apps-overview
  3. https://docs.mulesoft.com/mule-runtime/4.3/mmp-concept

We use cookies on this site to enhance your user experience. For a complete overview of how we use cookies, please see our privacy policy.