You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure DevOps自定义服务连接配置后页面不显示求助

问题描述

已在vss-extension.json文件中添加自定义服务连接的贡献配置(代码如下),且已安装该扩展,但在Azure DevOps页面中无法看到此服务连接。根据Azure DevOps官方文档,仅添加该贡献配置即可显示新服务连接,此外扩展中还包含一个无代理任务,未找到其他相关文档,请求协助解决。

配置代码

{
            "id": "sample-service-connection",
            "type": "ms.vss-endpoint.service-endpoint-type",
            "targets": [
                "ms.vss-endpoint.endpoint-types"
            ],
            "properties": {
                "name": "sampleChangeManagement",
                "displayName": "sample Change Management",
                "helpMarkDown": "Connect to Sample to manage sample in Azure DevOps Pipelines",
                "url": {
                    "displayName": "Sample URL",
                    "description": "The URL of your sample account, e.g. https://yourcompany.google.com"
                },
                "inputDescriptors": [
                    {
                        "id": "url",
                        "description": "Sample URL",
                        "inputMode": "textbox",
                        "isConfidential": false,
                        "validation": {
                            "isRequired": true,
                            "dataType": "string",
                            "maxLength": 200
                        }
                    }
                ],
                "authenticationSchemes": [
                    {
                        "type": "ms.vss-endpoint.endpoint-auth-scheme-token"
                    },
                    {
                        "type": "ms.vss-endpoint.endpoint-auth-scheme-basic",
                        "inputDescriptors": [
                            {
                                "id": "username",
                                "name": "Username",
                                "description": "Username",
                                "inputMode": "textbox",
                                "validation": {
                                    "isRequired": false,
                                    "dataType": "string"
                                }
                            },
                            {
                                "id": "password",
                                "name": "Password",
                                "description": "Password",
                                "inputMode": "passwordbox",
                                "isConfidential": true,
                                "validation": {
                                    "isRequired": false,
                                    "dataType": "string"
                                }
                            }
                        ]
                    }
                ]
            }
        }

相关截图

Azure DevOps服务连接页面截图

排查与解决建议
  • 确认扩展安装范围:检查扩展是安装在组织级别还是单个项目。如果是项目级安装,仅对应项目能看到该服务连接类型;若需全组织可见,需在组织市场安装并确保作用范围覆盖所有项目。
  • 验证贡献配置结构:确保contributions数组位于vss-extension.json的根层级,而非嵌套在其他配置节点下;同时检查properties.name字段是否唯一,避免与现有服务连接类型重名。
  • 清除前端缓存:Azure DevOps前端可能缓存旧的扩展元数据,清除浏览器缓存后重新打开服务连接创建页面。
  • 检查扩展版本与状态:确认安装的是最新版本的扩展,私有市场发布的扩展需确保状态为“已发布”。
  • 验证用户权限:当前登录用户需拥有创建服务连接的权限,同时在组织设置的“扩展”页面检查该扩展的权限配置是否正常。
  • 添加数据源绑定(可选):部分服务连接类型需要配置数据源绑定才能正常显示,若需要验证连接可用性,可在properties中添加如下配置:
    "dataSourceBindings": [
      {
        "name": "TestConnection",
        "endpointUrl": "{{endpoint.url}}/api/test",
        "resultSelector": "jsonpath:$"
      }
    ]
    
  • 查看错误日志:打开浏览器开发者工具(F12)查看控制台报错,或在Azure DevOps组织设置的“扩展-管理扩展”中查看该扩展的运行日志。

内容的提问来源于stack exchange,提问作者Narendran Kannan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.29 11:42:57