ankitbko / vscode-pull-request-azdo

Azure Devops Pull Requests for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ankitbko.vscode-pull-request-azdo
MIT License
64 stars 23 forks source link

settings for PAT or OAuth #81

Closed mortenrs closed 7 months ago

mortenrs commented 9 months ago

The new OAuth login do not work for me on self hosted Azure server.

Can you make a setting that select to use the PAT for login?

ankitbko commented 9 months ago

Sure I will add that as an option. What do you mean by self hosted server? You mean onpremise instance?

mortenrs commented 9 months ago

Yes you can call it onpremise. It requires VPN to access it.

Error log:

[Debug 1700924726.387s] AzdoRepository> Auth> Failed: {"$id":"1","innerException":null,"message":"TF400813: Resource not available for anonymous access. Client authentication required.","typeName":"Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException, Microsoft.TeamFoundation.Framework.Server","typeKey":"UnauthorizedRequestException","errorCode":0,"eventId":3000}

[Debug 1700924726.387s] Error: {"$id":"1","innerException":null,"message":"TF400813: Resource not available for anonymous access. Client authentication required.","typeName":"Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException, Microsoft.TeamFoundation.Framework.Server","typeKey":"UnauthorizedRequestException","errorCode":0,"eventId":3000}
    at _.<anonymous> (c:\Users\ <hidden> \.vscode\extensions\ankitbko.vscode-pull-request-azdo-0.2.1\dist\extension.js:5:873741)
    at Generator.next (<anonymous>)
    at e (c:\Users\ <hidden> \.vscode\extensions\ankitbko.vscode-pull-request-azdo-0.2.1\dist\extension.js:5:871091)
...

[Debug 1700925169.772s] AzdoRepository> Auth> Failed: {"$id":"1","innerException":null,"message":"TF400813: Resource not available for anonymous access. Client authentication required.","typeName":"Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException, Microsoft.TeamFoundation.Framework.Server","typeKey":"UnauthorizedRequestException","errorCode":0,"eventId":3000}

[Debug 1700925169.772s] Error: {"$id":"1","innerException":null,"message":"TF400813: Resource not available for anonymous access. Client authentication required.","typeName":"Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException, Microsoft.TeamFoundation.Framework.Server","typeKey":"UnauthorizedRequestException","errorCode":0,"eventId":3000}
    at _.<anonymous> (c:\Users\ <hidden> \.vscode\extensions\ankitbko.vscode-pull-request-azdo-0.2.1\dist\extension.js:5:873741)
    at Generator.next (<anonymous>)
    at e (c:\Users\ <hidden> \.vscode\extensions\ankitbko.vscode-pull-request-azdo-0.2.1\dist\extension.js:5:871091)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

[Debug 1700925169.773s] AzdoRepository> Auth> Failed: {"$id":"1","innerException":null,"message":"TF400813: Resource not available for anonymous access. Client authentication required.","typeName":"Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException, Microsoft.TeamFoundation.Framework.Server","typeKey":"UnauthorizedRequestException","errorCode":0,"eventId":3000}

[Debug 1700925169.773s] Error: {"$id":"1","innerException":null,"message":"TF400813: Resource not available for anonymous access. Client authentication required.","typeName":"Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException, Microsoft.TeamFoundation.Framework.Server","typeKey":"UnauthorizedRequestException","errorCode":0,"eventId":3000}
    at _.<anonymous> (c:\Users\ <hidden> \.vscode\extensions\ankitbko.vscode-pull-request-azdo-0.2.1\dist\extension.js:5:873741)
    at Generator.next (<anonymous>)
    at e (c:\Users\ <hidden> \.vscode\extensions\ankitbko.vscode-pull-request-azdo-0.2.1\dist\extension.js:5:871091)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

[Debug 1700925169.777s] Review> Validate state in progress
toquanghieu commented 9 months ago

same my issue, could we add an option in ext setting to choose auth method My company don't allow login from external network, so we just can use PAT only

fabianem commented 9 months ago

same for me, that option for the PAT would be great

maxmitti commented 7 months ago

Any update on this? I also have issues with on on-premise instance. I was able to login with a PAT token using version 0.0.25 of this extension, but I can’t find a way to use a PAT token with version 0.2.1.

ankitbko commented 7 months ago

Fixed in v0.2.2 https://github.com/ankitbko/vscode-pull-request-azdo/pull/83