Lesstep
Azure DevOps Services · Personal access tokens · Checked November 22, 2026

Azure DevOps: "Your ability to create global personal access tokens (PATs) is restricted by your organization"

An administrator of your Microsoft Entra tenant or your Azure DevOps organization switched on a policy that limits new personal access tokens (PATs), and the token you tried to create breaks its rule. Most often the rule is one of three: no token for "All accessible organizations", no token with the "Full access" scope, or a maximum number of days. Pick one organization, select only the scopes you need, shorten the expiration, and try again. If the page still refuses, ask a Project Collection Administrator to put you (or better, a group you are in) on the policy's allowlist, or sign in with Microsoft Entra instead of a token.

The messages

Your ability to create global personal access tokens (PATs) is restricted by your organization.

Microsoft's post of November 9, 2021 names this one and says to ask the administrator whether the policy that restricts global PATs is on.

Full scoped PAT is restricted by your organisation

Reported in a public write-up: the policy "Restrict full-scoped personal access token creation" was on and its allowlist was empty. A fourth case has no message of its own: with the organization policy "Restrict personal access token (PAT) creation" on, users who are not on the allowlist see only packaging scopes on the "Create a new personal access token" dialog (Manage PATs with policies).

Without a token: Azure DevOps Pull Requests, a plugin for JetBrains IDEs, can sign in to Azure DevOps Services with your Azure CLI sign-in (az login) for organizations that restrict tokens.

Which policy it is

PolicySet byWhat it forbids
Restrict global personal access token creationAzure DevOps Administrator, tenant: Organization settings, Microsoft EntraAccess scope "All accessible organizations"; a token must name one organization
Restrict full-scoped personal access token creationSame placeThe "Full access" scope; you choose scopes one by one
Enforce maximum personal access token lifespanSame placeAn expiration later than the number of days the administrator set
Restrict personal access token (PAT) creationProject Collection Administrator: Organization settings, Policies. Only for organizations backed by Microsoft EntraCreating and regenerating tokens at all, except for the allowlist and, if ticked, packaging-only tokens

Every policy has its own allowlist, so being exempt from one does not exempt you from another. Tokens you already have are not affected by these policies: they keep working until they expire, but may not be regenerated if a policy now forbids it, and the expiration email then names the restriction (Use personal access tokens).

What you can change yourself

  1. In the dialog, set Organization to one organization, not "All accessible organizations".
  2. Under Scopes choose Custom defined and tick only what the tool needs. A tool that reads pull requests needs Code (Read).
  3. Set an expiration of a few weeks, not a year.

If it still fails, the organization policy is the one in the way. Send the administrator the name of the tool and the scopes it needs, and ask for the allowlist entry. Microsoft's own advice is to use groups on allowlists, not named users.

What an administrator sets

For the tenant policies: Organization settings, then Microsoft Entra, then the policy's toggle and Add Microsoft Entra user or group. For the organization policy: Organization settings, then Policies, then "Restrict personal access token (PAT) creation". The sub-policy "Allow creation of PAT with packaging scope only" lets everyone make Azure Artifacts tokens, and "Allow creation of PAT of any scope for selected Microsoft Entra users and groups" is the allowlist; the subpolicies do not apply until the toggle is on.

Instead of a token: a Microsoft Entra sign-in

Microsoft recommends Microsoft Entra tokens over PATs wherever a tool supports them. For a one-off call, the Azure CLI gives you one for the Azure DevOps resource ID 499b84ac-1321-427f-aa17-267ca6975798; it lasts one hour (Issue Entra tokens with Azure CLI):

az login
az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query accessToken -o tsv

Send it as Authorization: Bearer <token>. If the second command asks you to sign in again, see "Interactive authentication is needed".

In the IDE

Azure DevOps Pull Requests, a plugin by Lesstep for JetBrains IDEs 2024.1 or later and Android Studio, has the setting "Use my Azure CLI sign-in (az login) instead of a token", for organizations that restrict personal access tokens. It works for Azure DevOps Services only, with the Azure CLI installed and signed in: the plugin runs az account get-access-token for the resource ID above, keeps the short-lived token in memory only, and asks again a few minutes before it expires. Azure DevOps Server has no Microsoft Entra sign-in and keeps using a token. When Azure DevOps rejects a token, the plugin says so and, on Azure DevOps Services, points to this setting. Reading is free; voting, commenting and completing are Pro, with a 30-day trial.

Get it on JetBrains Marketplace

Azure DevOps and Microsoft Entra are trademarks of Microsoft Corporation; IntelliJ IDEA and Rider are trademarks of JetBrains s.r.o. This page is not affiliated with or endorsed by Microsoft or JetBrains.

More: Global personal access tokens are being retired · Git "Authentication failed" · az repos pr and signing in to the Azure CLI · 日本語

Sources