0
votes

I need to create Azure Service Connection, I can create the same using UI in Azure DevOps portal. But I need to know if I can create the same using some Az command or ARM Template or any Powershell script ?

2
Have you checked my reply? If it helps you, you could Accept it as an Answer, this can be beneficial to other community members reading this thread.Cece Dong - MSFT
can I use my existing Service Principal details to create new service connection using "az devops service-endpoint create" ?Chaitanya

2 Answers

1
votes

You can create service endpoint via REST API or Azure DevOps CLI.

REST API:

POST https://dev.azure.com/{organization}/{project}/_apis/serviceendpoint/endpoints?api-version=5.1-preview.2

Azure DevOps CLI:

az devops service-endpoint create