How to create a service connection in Azure DevOps and share it with multiple projects.
Prerequisites:
- Azure DevOps project
- Service Principal Apps & service principals in Azure AD — Microsoft Entra | Microsoft Learn
Creating a service connection:
To create a service connection you can click on the little wheel on the bottom left of your Azure DevOps project:
Then click on new service connection.
Fill in all the specifications and add the service principal information. After all is validated you should have a new service connection.
The next step is to share your service connection with other projects.
- Choose the service connection you have created
- On the top right are three dots and you want to go to Security
- On the bottom you will find this option:
By adding other DevOps projects you will be able to use the service connection there too. No need to create multiple service connections based on one service principal.
If you found this article useful, please follow me.