VS30063: You are not authorized to access https://dev.azure.com? Error while trying to register Private agent Pool in Azure DevOps Project using PAT token.
VS30063: You are not authorized to access https://dev.azure.com? Error while trying to register Private agent Pool in Azure DevOps Project using PAT token.
@Shachindra Thanks for reaching out. This could be happening because the generated Personal Access Token has expired or wasn't created with the right Scope.
For registering a self-hosted agent, please generate a PAT as follows:
Sign in to your Azure DevOps organization (https://dev.azure.com/{your_organization}) with the user account you plan to use.
Open your user settings from the home page and select Personal access tokens.
For the scope select Agent Pools (read, manage) and make sure all the other boxes are cleared. If it's a deployment group agent, for the scope select Deployment group (read, manage) and make sure all the other boxes are cleared.
Select Show all scopes at the bottom of the Create a new personal access token window window to see the complete list of scopes.
Please check if this helps. If you have further questions, please post your question in the following forum where the Azure DevOps team and DevOps community are actively answering questions: https://developercommunity.visualstudio.com/spaces/21/index.html as Azure DevOps and its services are not supported on the Microsoft Q&A platform.
I was having the same problem. To fix it, when I created the personal access token, I had to select All accessible organizations for the Organization.
Having the same issue when running an unattended configuration through a Custom Script Extension and passing the PAT as an input parameter for the script.
I've discovered that PAT string was joined with a "," (comma) at the end. Solved removing the unwanted character:
$PatFormatted = $PersonalAccessToken.Trim(",") and specifying $PatFormatted in the configure --unattended command.
5 people are following this question.