Manage personal access tokens using policies - Azure DevOps (2024)

  • Article

Azure DevOps Services

This article explains how to limit the creation, scope, and lifespan of new or renewed personal access tokens (PATs) for users in Azure DevOps using Microsoft Entra policies. It also covers managing the automatic revocation of leaked PATs. Each policy's default behavior is detailed in its respective section.

Important

Existing PATs, created through both the UI and APIs, remain valid for the rest of their lifespan. Update your existing PATs to comply with the new restrictions to ensure successful renewal.

Prerequisites

Restrict creation of global PATs

The Azure DevOps Administrator in Microsoft Entra can restrict users from creating global PATs, which apply to all accessible organizations rather than a single organization. Enabling this policy requires new PATs to be associated with specific Azure DevOps organizations. By default, this policy is set to off.

  1. Sign in to your organization (https://dev.azure.com/{yourorganization}).

  2. Select Manage personal access tokens using policies - Azure DevOps (1) Organization settings.

    Manage personal access tokens using policies - Azure DevOps (2)

  3. Select Microsoft Entra, find the Restrict global personal access token creation policy and move the toggle to on.

    Manage personal access tokens using policies - Azure DevOps (3)

Restrict creation of full-scoped PATs

The Azure DevOps Administrator in Microsoft Entra can restrict users from creating full-scoped PATs. Enabling this policy requires new PATs to be limited to a specific, custom-defined set of scopes. By default, this policy is set to off.

  1. Sign in to your organization (https://dev.azure.com/{yourorganization}).

  2. Select Manage personal access tokens using policies - Azure DevOps (4) Organization settings.

  3. Select Microsoft Entra, find the Restrict full-scoped personal access token creation policy and move the toggle to on.

    Manage personal access tokens using policies - Azure DevOps (5)

Set maximum lifespan for new PATs

The Azure DevOps Administrator in Microsoft Entra ID can define the maximum lifespan of a PAT, specifying it in days. By default, this policy is set to off.

  1. Sign in to your organization (https://dev.azure.com/{yourorganization}).

  2. Select Manage personal access tokens using policies - Azure DevOps (6) Organization settings.

  3. Select Microsoft Entra, find the Enforce maximum personal access token lifespan policy and move the toggle to on.

    Manage personal access tokens using policies - Azure DevOps (7)

  4. Enter the number of maximum days, and then select Save.

Add Microsoft Entra users or groups to the allowlist

Warning

We recommend using groups for your tenant policy allow lists. If you use a named user, note that a reference to their identity will reside in the United States, Europe (EU), and Southeast Asia (Singapore).

Users or groups on the allowlist are exempt from the restrictions and enforcements of these policies when enabled. To add a user or group, select Add Microsoft Entra user or group, then select Add. Each policy has its own allowlist. If a user is on the allowlist for one policy, other activated policies still apply. Therefore, to exempt a user from all policies, add them to each allowlist.

Revoke leaked PATs automatically

The Azure DevOps Administrator in Microsoft Entra ID can manage the policy that automatically revokes leaked PATs. This policy applies to all PATs within organizations linked to your Microsoft Entra tenant. By default, this policy is set to on. If Azure DevOps PATs are checked into public GitHub repositories, they're automatically revoked.

Warning

Disabling this policy means any PATs checked into public GitHub repositories will remain active, potentially compromising your Azure DevOps organization and data, and putting your applications and services at significant risk. Even with the policy disabled, you will still receive an email notification if a PAT is leaked, but it will not be revoked automatically.

Turn off automatic revocation of leaked PATs

  1. Sign in to your organization (https://dev.azure.com/{yourorganization}).

  2. Select Manage personal access tokens using policies - Azure DevOps (8) Organization settings.

  3. Select Microsoft Entra, find the Automatically revoke leaked personal access tokens policy and move the toggle to off.

The policy is disabled and any PATs checked into public GitHub repositories remain active.

Next steps

Related articles

Manage personal access tokens using policies - Azure DevOps (2024)
Top Articles
Tax Loss Harvesting+
Should You Cancel Amazon Prime? Here Are 12 Good Reasons
Live Basketball Scores Flashscore
Obor Guide Osrs
Vaya Timeclock
Hk Jockey Club Result
Puretalkusa.com/Amac
Select The Best Reagents For The Reaction Below.
Gameday Red Sox
Self-guided tour (for students) – Teaching & Learning Support
Mylife Cvs Login
Roblox Character Added
Blue Ridge Now Mugshots Hendersonville Nc
Craigslist Motorcycles Orange County Ca
Georgia Vehicle Registration Fees Calculator
Willam Belli's Husband
Nz Herald Obituary Notices
Woodmont Place At Palmer Resident Portal
Glover Park Community Garden
What Time Does Walmart Auto Center Open
27 Paul Rudd Memes to Get You Through the Week
683 Job Calls
Hdmovie2 Sbs
Smartfind Express Login Broward
Mobile crane from the Netherlands, used mobile crane for sale from the Netherlands
1964 Impala For Sale Craigslist
Revelry Room Seattle
91 Octane Gas Prices Near Me
Datingscout Wantmatures
Taktube Irani
Persona 4 Golden Taotie Fusion Calculator
Utexas Baseball Schedule 2023
Average weekly earnings in Great Britain
Most popular Indian web series of 2022 (so far) as per IMDb: Rocket Boys, Panchayat, Mai in top 10
Solve 100000div3= | Microsoft Math Solver
Cvb Location Code Lookup
Dallas City Council Agenda
Andhra Jyothi Telugu News Paper
Daily Jail Count - Harrison County Sheriff's Office - Mississippi
Emerge Ortho Kronos
The TBM 930 Is Another Daher Masterpiece
Insideaveritt/Myportal
Adam Bartley Net Worth
Craigslist Mexicali Cars And Trucks - By Owner
Gateway Bible Passage Lookup
Powerboat P1 Unveils 2024 P1 Offshore And Class 1 Race Calendar
Swoop Amazon S3
Gabrielle Abbate Obituary
Ewwwww Gif
Gummy Bear Hoco Proposal
The Goshen News Obituary
Latest Posts
Article information

Author: Nathanial Hackett

Last Updated:

Views: 6085

Rating: 4.1 / 5 (52 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Nathanial Hackett

Birthday: 1997-10-09

Address: Apt. 935 264 Abshire Canyon, South Nerissachester, NM 01800

Phone: +9752624861224

Job: Forward Technology Assistant

Hobby: Listening to music, Shopping, Vacation, Baton twirling, Flower arranging, Blacksmithing, Do it yourself

Introduction: My name is Nathanial Hackett, I am a lovely, curious, smiling, lively, thoughtful, courageous, lively person who loves writing and wants to share my knowledge and understanding with you.