How to reduce the number of IDCS App's created due to multiple VBCS Profiles

How to reduce the number of IDCS App's created due to multiple VBCS Profiles

Application Profiles are one important concept if we are working in a true agile development model with multiple environments like Dev,UAT,Prod etc.

You can read about Application Profile concepts from here.

Every VBCS application will have entries in IDCS side. If there are multiple versions and multiple application profiles for each application then the number of entries will increase so many folds. For example, if we have an application with two versions and each version has three application profiles then IDCS would have SIX entries.

Check this section of blog to see more details on how to find it on IDCS side


This could easily get out of control and IDCS app count could grow exponentially. Ideally when we deploy the app in higher instances we generally do not care about other application profiles. Hence we do not also care about the other entries.


We still can keep the configuration for different application profile in our source code. But during deployment we will modify a file in order to create only one application profile entry for that instance.

We leverage the build job to do this.

  • Lets assume these are our application profiles


  • And the corresponding Service connection details are also set


  • Now just triggering the build job (Package and Deploy step) would deploy the application with whatever the application profile mentioned in the Deploy Step. But it will create IDCS apps for all the profiles not just the one choosen.


  • Now as a custom solution let us add a step just before the Packaging Step. It will be UNIX command to modify the deployment-profiles.json file where we are clearing the file contents first and writing only one application profile entry as required in that build.


> "$dp"
jq --null-input --arg profile "UAT"  '{"profiles":[{"displayName":$profile,"id":$profile}],"defaults":{"dev":$profile,"stage":$profile,"publish":$profile}}' > "$dp"

That's it. Now there will be only one entry in IDCS.