![](/img/trans.png)
[英]How to edit service connection, authorize and run in Azure DevOps Pipeline?
[英]Azure Devops - How to reset Resource Group in Edit service connection
我们无法在 UI 中将资源组更改为空,因为它是设计使然。
有一个解决方法是使用Rest API修改服务连接。 请参阅类似案例: https://developercommunity.visualstudio.com/t/Cant-change-resource-group-to-empty-in-/1396077 。
获取请求正文:
GET https://dev.azure.com/{organization}/{project}/_apis/serviceendpoint/endpoints/{endpointId}?api-version=7.1-preview.4
更新服务连接:
PUT https://dev.azure.com/{organization}/_apis/serviceendpoint/endpoints/{endpointId}?api-version=7.1-preview.4
请将 scope 设置为空。
"authorization": {
"parameters": {
"tenantid": "",
"serviceprincipalid": "",
"authenticationType": "spnKey",
"scope": "", // this is the resource group
"serviceprincipalkey": null
},
"scheme": "ServicePrincipal"
},
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.