Answers: <p>I am assuming this is also a new organization/project in Azure DevOps.</p>
  <p>In that case, you will have to create that service connection in Azure DevOps.</p>
  <p>If you do not want to edit the yaml, you will need to find the name of the service connection being used in the pipeline and create the service connection with that exact same name.</p>
  <p>If you don't check the box to 'Grant access permission to all pipelines' when creating the service connection, then you will also get a pop-up on the first pipeline run to 'Authorize Resources' before the pipeline will actually run.</p>
  
Answers: CC BY-SA 4.0
Answers: 2023-08-11T17:23:36.383Z
Answers: 2023-08-11T17:23:36.383Z
Answers: Matthew Robertson
Answers: <p>You can change out the service connections for your DevOps project by navigating to the <code>Project Settings</code></p>
  <p><a href="https://i.sstatic.net/zuONy.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/zuONy.png" alt="enter image description here" /></a></p>
  <p>and then selecting <code>Service Connections</code></p>
  <p><a href="https://i.sstatic.net/3Enyo.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3Enyo.png" alt="enter image description here" /></a></p>
  
Answers: CC BY-SA 4.0
Answers: 2022-10-11T00:24:56.347Z
Answers: 2022-10-11T00:24:56.347Z
Answers: jsprovoke
Answers: <p>You can click on <code>Edit</code>. The UI will give the notification that the connection is not available and only classic editor is available. The connection can be changed to a different one in the classic editor.</p>
  
Answers: CC BY-SA 4.0
Answers: 2022-10-07T15:27:43.233Z
Answers: 2022-10-07T15:27:43.233Z
Answers: kap
Body: <p>I have a build pipeline already configured using a .yml file. I transferred the repository over to a different organization on GitHub, added all of the necessary Azure Pipelines integrations and permissions in GitHub, and added the service connection to Azure Devops.</p>
  
  <p>Now, when I go to run my pipeline I get the error: <code>Service connection {id} not found in the project {projectId}</code></p>
  
  <p>This is true. I don't want it to use the old service connection. I want to tell Azure DevOps to use the new one. How do I change this?</p>
  
  <p>The only workaround I can find is to create a new pipeline. Fortunately, this links right up with GitHub and I don't have to rewrite the yaml. Unfortunately, I'd have to plugin all the pipeline variables again.</p>
  
Comments: CC BY-SA 4.0
Comments: 2021-01-09T15:49:42.963Z
Comments: Have you checked the yaml files for service connection name? https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml#use-a-service-connection
Comments: Piotr Gwiazda
Tags: <azure-devops>
Title: Azure DevOps - How Do I Change the Service Connection for a Build Pipeline
UserDisplayName: dapperdandev
ThreadText: # Azure DevOps - How Do I Change the Service Connection for a Build Pipeline
  
  (Asked by: username_0 on 2020-06-02)
  
  I have a build pipeline already configured using a .yml file. I transferred the repository over to a different organization on GitHub, added all of the necessary Azure Pipelines integrations and permissions in GitHub, and added the service connection to Azure Devops.
  
  Now, when I go to run my pipeline I get the error: `Service connection {id} not found in the project {projectId}`
  
  This is true. I don't want it to use the old service connection. I want to tell Azure DevOps to use the new one. How do I change this?
  
  The only workaround I can find is to create a new pipeline. Fortunately, this links right up with GitHub and I don't have to rewrite the yaml. Unfortunately, I'd have to plugin all the pipeline variables again.
  
  **Tags:** azure-devops
  
  > **Comments:**
  > **username_1**: Have you checked the yaml files for service connection name? https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml#use-a-service-connection  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_2 on 2023-08-11. Score: 0
  
  I am assuming this is also a new organization/project in Azure DevOps.
  
  In that case, you will have to create that service connection in Azure DevOps.
  
  If you do not want to edit the yaml, you will need to find the name of the service connection being used in the pipeline and create the service connection with that exact same name.
  
  If you don't check the box to 'Grant access permission to all pipelines' when creating the service connection, then you will also get a pop-up on the first pipeline run to 'Authorize Resources' before the pipeline will actually run.
  
  
  ---
  
  ### Answer by username_3 on 2022-10-11. Score: 0
  
  You can change out the service connections for your DevOps project by navigating to the `Project Settings`
  
  [![enter image description here](https://i.sstatic.net/zuONy.png)](https://i.sstatic.net/zuONy.png)
  
  and then selecting `Service Connections`
  
  [![enter image description here](https://i.sstatic.net/3Enyo.png)](https://i.sstatic.net/3Enyo.png)
  
  
  ---
  
  ### Answer by username_4 on 2022-10-07. Score: 0
  
  You can click on `Edit`. The UI will give the notification that the connection is not available and only classic editor is available. The connection can be changed to a different one in the classic editor.
  
  
  ---
  
  