Azure DevOps: Share a service connection across projects

kzankpekzankpe
2 min read

Prerequisite

  • Azure DevOps organization and projects

  • The appropriate permissions to create and manage service connection. See official page here

Create a service connection

If you don’t have service connection ready to be shared, please the steps below to create one.

  1. In your DevOps project settings

  2. Select service connections

  3. On the next page select New service connection at the top right

  4. On the opened panel, select the authentication method and enter the required parameters

Share a service connection

To share a service connection, go to the service connection menu and select the service connection. Click on the three dots to display the security menu.

On the security page, you will find at he bottom, you will find Project permissions. By adding others projects in your organization, you will be able to use the service connection in those projects.

Conclusion

Having one service connection that is shared between project reduce the maintenance task. If the service need to be updated, a token renewal for instance, it will be done in one place.

The shared service connection name will slightly change in the projects:

In the original project : The service connection will have a tagged Shared

In the other projects : In other project the service connection name will be as follow : OrignalName-ProjectName

For example: if we decide to share the service connection AZ-POC with the project Sandbox. The service connection name in Sandbox will be AZ-POC-Sandbox.

0
Subscribe to my newsletter

Read articles from kzankpe directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

kzankpe
kzankpe