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 6 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.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,262 questions
{count} vote

6 answers

Sort by: Most helpful
  1. Neil Gealy 26 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.

    5 people found this answer helpful.
    0 comments No comments

  2. 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

  3. Cesar Medina 15 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!

    3 people found this answer helpful.

  4. 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

  5. Chintu Sasmal 5 Reputation points
    2023-06-20T08:05:56.67+00:00

    Probably , there must be wrong server URL name, cross check that once.

    0 comments No comments