I am trying to list all the workspaces and trying to authenticate tf.exe with vsts using the below commandline.
tf workspaces /Collection: https://[account].visualstudio.com/defaultcollection /login:USername,Password
The vsts account is backed by Azure Active Directory synced with an on-prem AD.
It works fine when I have connected to the vsts from visual studio and then running the above tf.exe command without the login switch.
But, when I use the login switch for tf.exe and use the same credentials that I use in visual studio it throws
TF30063: You are not authorized to access https://[account].visualstudio.com/defaultcollection TF30063: You are not authorized to access https://[account].visualstudio.com/defaultcollection
What I am trying to achieve is that I am going to provision a server and then not going to login to visual studio and want my tf to work as it works when logged in to the visual studio online account in the team explorer of my visual studio.
I am an admin of the vsts account and have full right on everything. If there are other ways of doing this possibly authenticate TF.exe using PAT token that would work as well.
I would use tf.exe again for a checkin command from automated builds. Any help in solving this would be appreciated.