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 N Yadav 11 Reputation points
2021-02-14T17:16:41.023+00:00

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.

Community Center | Not monitored
{count} votes

6 answers

Sort by: Most helpful
  1. Neil Gealy 46 Reputation points
    2021-12-14T18:36:27.23+00:00

    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.

    9 people found this answer helpful.

  2. Cesar Medina 25 Reputation points
    2023-09-26T23:24:07.71+00:00

    Not sure if that helps but I was entering the wrong URL, a slash was missing at the end

    I put: https://dev.azure.com/*myorg*

    The correct value is: https://dev.azure.com/myorg/

    Hope this helps to somone!

    5 people found this answer helpful.

  3. BhargaviAnnadevara-MSFT 5,466 Reputation points
    2021-02-15T03:42:47.287+00:00

    @Shachindra N Yadav 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:

    1. Sign in to your Azure DevOps organization (https://dev.azure.com/{your_organization}) with the user account you plan to use.
    2. Open your user settings from the home page and select Personal access tokens.
    3. Create a PAT.
    4. 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.

    4 people found this answer helpful.
    0 comments No comments

  4. rqmang 5 Reputation points
    2024-04-03T18:17:09.6533333+00:00

    i had the same issue and the workaround i tried was;

    • in Azure DEvOps >> Space Game - web - Agent >> Project settings
    • under Pipelines >> Agent pools
    • select MyAgentPool
    • select the Agents tab
    • click on the New agent button
    • select the Linux tab
    • under x64, Create the agent
    • check the version of the tar.gz file (ie. vsts-agent-linux-x64-<version>.tar.gz)
    • in bash, set the value of the export AZP_AGENT_VERSION=<version>
    • rerun sudo -E ./build-agent.sh

    hope this helps.

    1 person found this answer helpful.
    0 comments No comments

  5. Elisa Anzelmo 1 Reputation point Microsoft Employee
    2022-06-16T23:14:08.193+00:00

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.