- Using an on-premises build server with Azure DevOps Services
- Build agent configured to use an AD account with administrative privileges on the build server
- Pipeline executes a Powershell script which, in turn, executes the
tf.exe
utility - Specific command is
tf.exe vc workspaces /collection:[Azure collection address]
- Command fails with F30063: You are not authorized to access [Azure collection address]
- Thought the problem could be resolved by providing the build agent's user/pass with the
/login
switch. But this seems to make no difference to theworkspaces
command
This problem can be temporarily resolved by:
- Log onto build server using the same account that is used by the build agent
- Open a Visual studio command prompt
- Run the command:
tf.exe vc workspaces /collection:[Azure collection address]
- At this point, the Microsoft login screen is displayed e.g.
- Provide the login with the build agent's credentials
- Command runs successfully
- If the pipeline is run again after this, it will run successfully as well
- But after an seemingly variable period of time (sometimes days), this authentication appears to expire and the pipeline begins throwing the "unauthorized access" error again
- Then the "fix" with the command line needs to be repeated
What needs to be done to persist the authentication within the pipeline (or Powershell script) so the account information does not need to be manually reentered?