TFS Web调用外部REST服务时抛出401错误
在TFS中创建web钩子以访问外部rest服务url时,在TFS应用程序中进行测试时出现401错误。我认为这个调用根本没有触及API 下面是我能看到的回应TFS Web调用外部REST服务时抛出401错误,rest,tfs,unauthorized,Rest,Tfs,Unauthorized,在TFS中创建web钩子以访问外部rest服务url时,在TFS应用程序中进行测试时出现401错误。我认为这个调用根本没有触及API 下面是我能看到的回应 Status Code: 401 Reason Phrase: Unauthorized HTTP Version: 1.1 Headers: { Server: Microsoft-IIS/7.5 WWW-Authenticate: Negotiate WWW-Authenticate: NTLM X-Powered-By:
Status Code: 401
Reason Phrase: Unauthorized
HTTP Version: 1.1
Headers:
{
Server: Microsoft-IIS/7.5
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
X-Powered-By: ASP.NET
X-UA-Compatible: IE=EmulateIE8
Date: Fri, 30 Mar 2018 21:05:26 GMT
Content-Length: 1293
Content-Type: text/html
}
任何帮助都将不胜感激 错误ID 401通常与授权相关 您可以首先使用postman来双重检查对API的用户ID访问 还可以使用week hook访问其他rest服务url,如中的示例。如果问题与rest服务url相关,则这将缩小范围
除了尝试使用基本身份验证外,您还可以使用备用帐户。如何请看:我认为错误很明显。您正在从外部服务获得身份验证,并且正在使用windows身份验证。检查目标服务的权限。我的用户id有权访问此API web API