{"id":61796,"date":"2021-06-03T09:46:59","date_gmt":"2021-06-03T17:46:59","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/devops\/?p=61796"},"modified":"2021-12-22T07:49:16","modified_gmt":"2021-12-22T15:49:16","slug":"new-policies-to-restrict-personal-access-token-scope-and-lifespan","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/new-policies-to-restrict-personal-access-token-scope-and-lifespan\/","title":{"rendered":"New policies to restrict personal access token scope and lifespan"},"content":{"rendered":"<p><a href=\"https:\/\/docs.microsoft.com\/azure\/devops\/organizations\/accounts\/use-personal-access-tokens-to-authenticate?view=azure-devops&amp;tabs=preview-page\">Personal access tokens (PATs)<\/a> make it easy to authenticate against <a href=\"http:\/\/azure.com\/devops\">Azure Devops<\/a> to integrate with your tools and services. However, <a href=\"https:\/\/devblogs.microsoft.com\/devops\/mitigating-leaked-personal-access-tokens-pats-found-on-github-public-repositories\/\">leaked tokens<\/a> could compromise your Azure DevOps account and data, putting your applications and services at significant risk.<\/p>\n<p>Customers have told us that their administrators don\u2019t have the necessary controls to limit the threat surface area posed by leaked PATs.<\/p>\n<p>To protect our customers, we&#8217;ve added a new set of policies which can be used to restrict the scope and lifespan of your company&#8217;s Azure DevOps personal access tokens (PATs)! Here\u2019s how they work:<\/p>\n<p>Users assigned to the <a href=\"https:\/\/docs.microsoft.com\/azure\/active-directory\/users-groups-roles\/directory-assign-admin-roles#azure-devops-administrator\">Azure DevOps Administrator role in Azure Active Directory<\/a> can navigate to the \u201cAzure Active Directory\u201d tab in the organization settings of any Azure DevOps organization linked to their Azure AD.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2021\/06\/PAT_Controls.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2021\/06\/PAT_Controls-925x1024.png\" alt=\"Image PAT Controls\" width=\"640\" height=\"708\" class=\"alignnone size-large wp-image-61798\" srcset=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2021\/06\/PAT_Controls-925x1024.png 925w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2021\/06\/PAT_Controls-271x300.png 271w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2021\/06\/PAT_Controls-768x850.png 768w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2021\/06\/PAT_Controls.png 956w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>There, administrators can<\/p>\n<ol>\n<li>restrict the creation of global personal access tokens (tokens that work for all Azure DevOps organizations accessible by the user)<\/li>\n<li>restrict the creation of full-scoped personal access tokens <\/li>\n<li>define a maximum lifespan for new personal access tokens<\/li>\n<\/ol>\n<p>These policies will apply to all new PATs created by users for Azure DevOps organizations linked to the Azure AD tenant. Each of the policies has an allowlist for users and groups who should be exempt from the policy, but shouldn\u2019t be allowed to manage policy configuration.<\/p>\n<p>These policies only apply to new PATs, and will not affect existing PATs that have already been created and are in use. After the policies have been enabled however, any existing, now non-compliant PATs must be updated to be within the restrictions before they can be renewed.<\/p>\n<p>Please comment below with any questions, comments or issues you may have. We take your input seriously and read every bit of feedback. We\u2019re very excited for you all to try this out and let us know what you think!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Azure DevOps Administrators can now define a maximum lifespan for personal access tokens (PATs) and restrict the creation of global and full-scoped personal access tokens (PATs). These policies will affect all users and Azure DevOps organizations linked to the Azure AD tenant. <\/p>\n","protected":false},"author":51297,"featured_media":61797,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[228,251],"tags":[],"class_list":["post-61796","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-admin-licensing","category-security"],"acf":[],"blog_post_summary":"<p>Azure DevOps Administrators can now define a maximum lifespan for personal access tokens (PATs) and restrict the creation of global and full-scoped personal access tokens (PATs). These policies will affect all users and Azure DevOps organizations linked to the Azure AD tenant. <\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/61796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/51297"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=61796"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/61796\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/61797"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=61796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=61796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=61796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}