'PAT' = $AccountCredential.Password it seems like PAT created from AccountCredential is not working at the end I'm getting this error message. Install-VSTSAgent : VS30063: You are not authorized to access https://dev.azure.com.