# Azure DevOps: Share a service connection across projects

## Prerequisite

* Azure DevOps organization and projects
    
* The appropriate permissions to create and manage service connection. See official page [here](https://learn.microsoft.com/en-us/azure/devops/pipelines/policies/service-connection-permissions?view=azure-devops)
    

## 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
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1740913683135/cdad93b0-3a41-4832-baea-5d8b18b5249d.png align="center")
    

## 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.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1740914468002/0f29e1e7-6459-466e-971d-2a22f4fe5825.png align="center")

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

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1740914522751/b934669f-8f46-44a3-be45-82a8919f8a0c.png align="center")

## 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**.
