Closed saioia-msu closed 2 months ago
Hi At least in ADO (I did not test on TFS) the PAT is provided directly, without encoding. I just tested 2 minutes ago just in case. So the Set-VSTeamAccount cmdlet will expect you provide the PAT without encoding, that is, you just need to copy/paste from ADO to the console
I'm sorry, you're correct. I was getting the key from an internal API, not from the ADO UI. There it is provided as you described. I am new to ADO so I was not aware that was how it was normally delivered.
Still, it would be best to check to see if the PAT is already encoded and if so, to not re-encode it. Though I suppose such a situation would not be very common.
I'm just strolling by here but thanks for this as this is the very first question/issue I ran into.
For me, I didn't realize "account" is actually org. I was using my own AD account in a corp environment and getting 404
I think the docs could use improvement in this area. Especially since the "getting started" page really just points to a dead space where documentation might eventually be 😝
Steps to reproduce
If you provide a PAT that is already ready to use with the ADO API, with the colon-delimited prefix and base64 encoded again, the module will still re-encode it with a colon and empty prefix. This leads to weird errors and the module acting unpredictably. For example, this does not work:
The issue can be worked around by converting it back yourself after providing it to
Set-VSTeamAccount
, or supplying the correct value directly:Expected behavior
Actual behavior?
On Which OS have you tried it?
Windows
What was your server version?
Azure DevOps Services
Other server version
No response
Log output of used API
Log output of $PSVersionTable