Nandan
Nandan

Reputation: 4935

Update PAT of Self hosted agent

The user from whose PAT a self hosted agent was configured is leaving the organization. Once the users leaves the org, his account would be deleted from Azure AD and hence his PAT would be expired. How should one take over the self hosted agent or update the PAT with other users account?

I was unable to see any MSFT docs w.r.t PAT updates. Is uninstalling and reinstalling the only option in this scenario?

Upvotes: 10

Views: 7400

Answers (2)

GeralexGR
GeralexGR

Reputation: 3582

Inside the install directory of the agent (in my case it was C:\agent), you will find some files including

  • config.cmd
  • run.cmd

You can reconfigure your agent without uninstalling by running config.cmd editing the values and then run the agent again with run.cmd. You will be prompted to provide the PAT and also the agent pool. You can change only the values that you need.

Upvotes: 1

Shamrai Aleksander
Shamrai Aleksander

Reputation: 16018

You do not need to update PAT. Check the documentation: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops

enter image description here

Upvotes: 12

Related Questions