【发布时间】:2020-03-17 14:53:18
【问题描述】:
从这里的文档https://docs.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?view=azure-devops 看来,应用程序似乎可以使用 OAuth2 授权代码流来获取访问令牌。但是,如果我尝试使用客户端凭据流获取访问令牌,则会收到 invalid_resource 错误。令牌端点似乎支持客户端凭据流,但我无法让它工作。
POST https://app.vssps.visualstudio.com/oauth2/token
Content-Type application/x-www-form-urlencoded
grant_type=client_credentials&redirect_uri=$url&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&client_assertion=$assertion&client_id=$clientid&client_secret=$secret&scope=vso.code
什么是正确的资源价值?
【问题讨论】:
标签: azure-devops azure-devops-rest-api