Add ARM Service Endpoint programatically in VSTS

The name of the picture


Add ARM Service Endpoint programatically in VSTS



I have an existing SPN in Azure AD and want to add to VSTS programatically.
Is this possible?
VSTS Rest-API? Examples?
Through powershell?




1 Answer
1



You can use the REST API to manage your endpoints.



For example the following POST will create an Azure endpoint:



https://fabrikam.visualstudio.com/DefaultAgileGitProject/_apis/serviceendpoint/endpoints?api-version=4.1-preview.1


{
"data": {
"SubscriptionId": "12345678-1234-1234-1234-123456129012",
"SubscriptionName": "TestSubscriptionName"
},
"id": "64be39c2-102b-416d-a3ac-2de40ebc8513",
"name": "TestEndpoint",
"type": "Azure",
"authorization": {
"parameters": {
"Certificate": "dummyCertificate"
},
"scheme": "Certificate"
},
"isReady": false
}



You can find the full documentation here: https://docs.microsoft.com/en-us/rest/api/vsts/serviceendpoint/endpoints/create?view=vsts-rest-4.1






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Stripe::AuthenticationError No API key provided. Set your API key using “Stripe.api_key = ”

CRM reporting Extension - SSRS instance is blank

Keycloak server returning user_not_found error when user is already imported with LDAP