{"id":68772,"date":"2023-07-19T05:25:43","date_gmt":"2023-07-19T13:25:43","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/devops\/?p=68772"},"modified":"2024-02-23T16:23:39","modified_gmt":"2024-02-24T00:23:39","slug":"setting-up-aad-policies-in-azure-devops","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/setting-up-aad-policies-in-azure-devops\/","title":{"rendered":"Setting up AAD Policies in Azure DevOps"},"content":{"rendered":"<p>Recently we deployed Azure DevOps end to end at a customer environment and while deploying, we applied all necessary policies as per best practices. These policies can be applied by all customers and this blog aims to make it easier for our customers. The details are shared in a Q&amp;A format for better understanding.<\/p>\n<p>1&#46; Who can set up these policies?<\/p>\n<p>Identify a custodian user who would be managing Azure DevOps in your organization. The user can be same as your Azure Active Directory Administrator as well. Once, a user is identified we need to go to Azure Active Directory in Azure -> Roles and administrators -> All roles.<\/p>\n<p>Then we filter for the role Azure DevOps Administrator as shown below and click on this to make an Active assignment or an Eligible assignment for the user.\u00a0<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AzureDevOpsAdministrator.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AzureDevOpsAdministrator.png\" alt=\"Image AzureDevOpsAdministrator\" width=\"1876\" height=\"461\" class=\"alignnone size-full wp-image-68774\" srcset=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AzureDevOpsAdministrator.png 1876w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AzureDevOpsAdministrator-300x74.png 300w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AzureDevOpsAdministrator-1024x252.png 1024w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AzureDevOpsAdministrator-768x189.png 768w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AzureDevOpsAdministrator-1536x377.png 1536w\" sizes=\"(max-width: 1876px) 100vw, 1876px\" \/><\/a><\/p>\n<p>Once the role assignment is complete, as shown below &#8211;<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/RoleAssignment.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/RoleAssignment.png\" alt=\"Image RoleAssignment\" width=\"1880\" height=\"327\" class=\"alignnone size-full wp-image-68776\" srcset=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/RoleAssignment.png 1880w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/RoleAssignment-300x52.png 300w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/RoleAssignment-1024x178.png 1024w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/RoleAssignment-768x134.png 768w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/RoleAssignment-1536x267.png 1536w\" sizes=\"(max-width: 1880px) 100vw, 1880px\" \/><\/a><\/p>\n<p>Now the user can set up the ADO policies at Azure Active Directory level.<\/p>\n<p>2&#46; Where can a user see these policies?<\/p>\n<p>The policies are available at Organization Settings -> Azure Active Directory. A normal user can see the following screen in Azure Active Directory page in Azure DevOps.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AADNormalUser.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AADNormalUser.png\" alt=\"Image AADNormalUser\" width=\"748\" height=\"514\" class=\"alignnone size-full wp-image-68779\" srcset=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AADNormalUser.png 748w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AADNormalUser-300x206.png 300w\" sizes=\"(max-width: 748px) 100vw, 748px\" \/><\/a><\/p>\n<p>An user with Azure DevOps Administrator in the tenant would see the following additional policies\u00a0in Azure Active Directory page in Azure DevOps.<\/p>\n<p>Restrict Org Creation<\/p>\n<p>Restrict Global PAT Creation<\/p>\n<p>Restrict Full-Scoped PAT Creation<\/p>\n<p>Enforce Maximum PAT Lifespan<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AADADOAdmin.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AADADOAdmin.png\" alt=\"Image AADADOAdmin\" width=\"1115\" height=\"953\" class=\"alignnone size-full wp-image-68781\" srcset=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AADADOAdmin.png 1115w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AADADOAdmin-300x256.png 300w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AADADOAdmin-1024x875.png 1024w, https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2024\/02\/AADADOAdmin-768x656.png 768w\" sizes=\"(max-width: 1115px) 100vw, 1115px\" \/><\/a><\/p>\n<p>The policies are self-explanatory, and the Azure DevOps Administrator at tenant level can set these policies and these would be applicable for all users using Azure DevOps in the organization.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently we deployed Azure DevOps end to end at a customer environment and while deploying, we applied all necessary policies as per best practices. These policies can be applied by all customers and this blog aims to make it easier for our customers. The details are shared in a Q&amp;A format for better understanding. 1&#46; [&hellip;]<\/p>\n","protected":false},"author":148586,"featured_media":68774,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[253],"tags":[],"class_list":["post-68772","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-devops-server"],"acf":[],"blog_post_summary":"<p>Recently we deployed Azure DevOps end to end at a customer environment and while deploying, we applied all necessary policies as per best practices. These policies can be applied by all customers and this blog aims to make it easier for our customers. The details are shared in a Q&amp;A format for better understanding. 1&#46; [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/68772","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\/148586"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=68772"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/68772\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/68774"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=68772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=68772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=68772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}