{"id":2053,"date":"2018-11-10T11:00:48","date_gmt":"2018-11-10T11:00:48","guid":{"rendered":"https:\/\/developer.microsoft.com\/en-us\/office\/blogs\/?p=2053"},"modified":"2018-11-10T11:00:48","modified_gmt":"2018-11-10T11:00:48","slug":"30daysmsgraph-day-10-azure-ad-applications-on-v1-endpoint","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/30daysmsgraph-day-10-azure-ad-applications-on-v1-endpoint\/","title":{"rendered":"30DaysMSGraph \u2013 Day 10 \u2013 Azure AD applications on V1 endpoint"},"content":{"rendered":"<p><a href=\"https:\/\/aka.ms\/30DaysMSGraph\">List of all posts in the #30DaysMSGraph series<\/a><\/p>\n<p>-Today&#8217;s post written by <a href=\"https:\/\/twitter.com\/svarukala\">Srinivas Varukala<\/a><\/p>\n<p>In <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/blogs\/30daysmsgraph-day-9-azure-ad-applications-on-v2-endpoint\">Day 9<\/a> we discussed how to register an Azure AD Application using V2 endpoint. Today we\u2019ll look at registering an Azure AD Application using V1 endpoint that will be used to communicate with Microsoft Graph.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-2079\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/30DaysMSGraph_Day10_Source-1024x682.jpg\" alt=\"\" width=\"700\" height=\"466\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/30DaysMSGraph_Day10_Source-1024x682.jpg 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/30DaysMSGraph_Day10_Source-300x200.jpg 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/30DaysMSGraph_Day10_Source-768x512.jpg 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/30DaysMSGraph_Day10_Source.jpg 1280w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>As mentioned in <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/blogs\/30daysmsgraph-day-8-authentication-roadmap-and-access-tokens\">Day 8<\/a> and <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/blogs\/30daysmsgraph-day-9-azure-ad-applications-on-v2-endpoint\">Day 9<\/a>, the Azure AD V2 endpoint is the recommended authentication flow going forward.\u00a0 That said there are a limited number of cases where you may need to fall back to the V1 endpoint.\u00a0 You can read about such scenarios in the <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/active-directory\/develop\/azure-ad-endpoint-comparison#limitations\">Limitations<\/a> section on the &#8220;Comparing the Azure AD v2.0 endpoint with the v1.0 endpoint&#8221; article.\u00a0 For the purposes of today we will be going through registration of an Azure AD application using the existing Azure AD Portal app registration UI and the Azure AD V1 endpoint.\u00a0\u00a0See below diagram adapted from Day 8 current state roadmap with highlighted boxes on the components for today&#8217;s focus.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-2080\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-1-1024x431.png\" alt=\"\" width=\"800\" height=\"337\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-1-1024x431.png 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-1-300x126.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-1-768x323.png 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-1.png 1241w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/p>\n<h2>Registering an Azure AD V1 App using Azure AD App Registration<\/h2>\n<p>Open a browser and navigate to the <a href=\"https:\/\/aad.portal.azure.com\/\">Azure AD Portal<\/a>. Login using a<strong> personal account<\/strong> (aka: Microsoft Account) or <strong>Work or School Account<\/strong>.<\/p>\n<p>Click <strong>Azure Active Directory<\/strong> from the left-hand navigation menu.<\/p>\n<p>Select <strong>App registrations<\/strong> from the current blade navigation pane.<\/p>\n<p>Click <strong>+ New application registration<\/strong> from the current blade content.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-2081 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-2.png\" alt=\"\" width=\"696\" height=\"108\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-2.png 696w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-2-300x47.png 300w\" sizes=\"(max-width: 696px) 100vw, 696px\" \/><\/p>\n<p>On the Register an application page, specify the following values:<\/p>\n<ul>\n<li>Name = msgraph-clientcred-app-v1 (or any name that works for you)<\/li>\n<li>Application type = Web app\/API<\/li>\n<li>Sign-on URL = <a href=\"https:\/\/localhost:8081\">https:\/\/localhost:8081<\/a><\/li>\n<\/ul>\n<p><em>Note: The sign-on URL will also be used as the reply url (or redirect url) value. This value can be changed later and does not need to point to a hosted URI.<\/em><\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-2082 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-3.png\" alt=\"\" width=\"313\" height=\"364\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-3.png 313w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-3-258x300.png 258w\" sizes=\"(max-width: 313px) 100vw, 313px\" \/><\/p>\n<p>Click \u201c<strong>Create<\/strong>\u201d button to register the application.\u00a0 Azure portal will create the app and loads the application information page. On this page, copy the <strong>Application ID <\/strong>as you will need it later.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-2083 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-4.png\" alt=\"\" width=\"576\" height=\"256\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-4.png 576w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-4-300x133.png 300w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/><\/p>\n<p>Click on <strong>Settings<\/strong> in the current blade navigation pane to open the settings pane.<\/p>\n<p>Select Reply URLs. Add url <a href=\"https:\/\/app.getpostman.com\/oauth2\/callback\">https:\/\/app.getpostman.com\/oauth2\/callback<\/a> as the second url and <strong>Save<\/strong> it. We will use this URL when calling Microsoft Graph using Postman on day 14.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-2084 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-5.png\" alt=\"\" width=\"624\" height=\"179\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-5.png 624w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-5-300x86.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/p>\n<p>Select <strong>Keys<\/strong>. In the pane that opens create a new Password providing details as follows:<\/p>\n<ul>\n<li>Description = \u201cSecret1\u201d<\/li>\n<li>Expires = 1 year<\/li>\n<\/ul>\n<p>Soon after you hit Save the Value will show the auto-generated client secret. Make a copy of this value.<\/p>\n<p><em><strong>Important<\/strong>: This secret string is never shown again, so make sure you copy it now.<\/em><\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-2085 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-6.png\" alt=\"\" width=\"624\" height=\"204\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-6.png 624w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-6-300x98.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/p>\n<p>Select <strong>Required permissions<\/strong>. In the pane that opens click <strong>+ Add<\/strong>. In the pane that opens, for <strong>Select an API<\/strong> option, select <strong>Microsoft Graph<\/strong> and click <strong>Select<\/strong> button.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-2086 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-7.png\" alt=\"\" width=\"624\" height=\"327\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-7.png 624w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-7-300x157.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/p>\n<p>For <strong>Select permissions<\/strong> option, select <strong>Read all users\u2019 full profiles<\/strong> under the <strong>APPLICATION PERMISSIONS<\/strong> category.<\/p>\n<p><em><strong>Note<\/strong>: You will see that the <strong>Admin consent required<\/strong> column shows as <strong>Yes<\/strong>. This means the Azure AD Admin must grant the permissions before the application can be used to make Microsoft Graph queries. Please refer to Day 14 post for details on Admin consent.<\/em><\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-2087 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-8.png\" alt=\"\" width=\"624\" height=\"341\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-8.png 624w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-8-300x164.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/p>\n<p>Back on the <strong>Required permissions<\/strong> screen click <strong>Grant permissions<\/strong>, then click <strong>Yes<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-2088 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-9.png\" alt=\"\" width=\"549\" height=\"368\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-9.png 549w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day10-AADAppV1-9-300x201.png 300w\" sizes=\"(max-width: 549px) 100vw, 549px\" \/><\/p>\n<p>That completes the creation of an Azure AD Application using V1 endpoint.<\/p>\n<h2>Try It Out<\/h2>\n<p>Navigate to the <a href=\"https:\/\/aad.portal.azure.com\/\">Azure AD Portal<\/a>.\u00a0 Walk through these steps to create an app, assign it permissions, and grant admin consent.<\/p>\n<p><a href=\"https:\/\/github.com\/microsoftgraph\/30DaysMSGraph-TryItOut\/blob\/master\/Day10-AzureADAppV1.md\">Day 10 repo link<\/a><\/p>\n<ol>\n<li>Create a new Azure AD application<\/li>\n<li>Assign the delegated permission for Read user mail<\/li>\n<li>Assign the delegated permission for Read user calendars<\/li>\n<li>Assign the application permission for Read directory data<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>Join us tomorrow to review Azure AD application permissions in <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/blogs\/30daysmsgraph-day-11-azure-ad-application-permissions\">Day 11<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Day 9 we discussed how to register an Azure AD Application using V2 endpoint. Today we\u2019ll look at registering an Azure AD Application using V1 endpoint that will be used to communicate with Microsoft Graph.<\/p>\n","protected":false},"author":73055,"featured_media":25159,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3],"tags":[84],"class_list":["post-2053","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-graph","tag-30daysmsgraph"],"acf":[],"blog_post_summary":"<p>In Day 9 we discussed how to register an Azure AD Application using V2 endpoint. Today we\u2019ll look at registering an Azure AD Application using V1 endpoint that will be used to communicate with Microsoft Graph.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/2053","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/73055"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=2053"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/2053\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/25159"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=2053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=2053"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=2053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}