I have an existing SPN in Azure AD and want to add to VSTS programatically. Is this possible? VSTS Rest-API? Examples? Through powershell?
答案 0 :(得分:1)
您可以使用REST API来管理端点。
例如,以下POST将创建一个Azure终结点:
{
"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
}
您可以在此处找到完整的文档:https://docs.microsoft.com/en-us/rest/api/vsts/serviceendpoint/endpoints/create?view=vsts-rest-4.1