{"id":14309,"date":"2020-07-30T11:39:28","date_gmt":"2020-07-30T11:39:28","guid":{"rendered":"https:\/\/www.testpreptraining.com\/tutorial\/?page_id=14309"},"modified":"2020-08-27T06:40:54","modified_gmt":"2020-08-27T06:40:54","slug":"authorization-approach-in-azure-app-service","status":"publish","type":"page","link":"https:\/\/www.testpreptraining.ai\/tutorial\/authorization-approach-in-azure-app-service\/","title":{"rendered":"Authorization Approach in Azure App Service"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.testpreptraining.ai\/tutorial\/exam-az-304-microsoft-azure-architect-design\/\" target=\"_blank\" rel=\"noreferrer noopener\">Go back to AZ-304 Tutorials<\/a><\/p>\n\n\n\n<p>In this article, we will learn about App Service for simplifying authentication and authorization for apps including details about Azure App Service. So, let\u2019s understand it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Azure App Services<\/strong><\/h3>\n\n\n\n<p>Azure App Service provides built-in authentication and authorization support by using which you can sign in users and access data by:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Writing less or no code for your web app<\/li><li>RESTful API<\/li><li>Mobile back end<\/li><li>Or with Azure Functions<\/li><\/ul>\n\n\n\n<p>However, secure authentication and authorization need a deep understanding of security, including federation, encryption, JSON web tokens (JWT) management, grant types, and so on. But, App Service provides these utilities so that you can spend more time and energy on providing business value to your customer.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.testpreptraining.ai\/microsoft-azure-architect-design-az-304-free-practice-test\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" width=\"961\" height=\"150\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/08\/AZ-304-practice-tests-3.png\" alt=\"AZ-304 Practice tests\" class=\"wp-image-18182\" srcset=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/08\/AZ-304-practice-tests-3.png 961w, https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/08\/AZ-304-practice-tests-3-750x117.png 750w\" sizes=\"auto, (max-width: 961px) 100vw, 961px\" \/><\/a><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>App Service Working<\/strong><\/h4>\n\n\n\n<p>In App Service the authentication and authorization module runs in the same sandbox as the application code. However, when it&#8217;s enabled, every incoming HTTP request passes through it before being handled by your application code.<\/p>\n\n\n\n<p>Below, you can see an architecture diagram showing requests intercepted by a process in the site sandbox interacting with identity providers before allowing traffic to the deployed site.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/azure-app-service-working-1.png\" alt=\"Azure app service architecture diagram\" class=\"wp-image-14319\" width=\"769\" height=\"407\" srcset=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/azure-app-service-working-1.png 990w, https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/azure-app-service-working-1-750x397.png 750w\" sizes=\"auto, (max-width: 769px) 100vw, 769px\" \/><figcaption>Image Source: Microsoft<\/figcaption><\/figure><\/div>\n\n\n\n<p>This module controls several things for your app:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Firstly, authenticating users with the specified provider<\/li><li>Secondly, validating, storing, and refreshing tokens<\/li><li>Thirdly, managing the authenticated session<\/li><li>Lastly, injecting identity information into request headers<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Authorization behavior<\/strong><\/h4>\n\n\n\n<p>In the Azure portal, you can configure App Service authorization with a number of behaviors when an incoming request is not authenticated.<\/p>\n\n\n\n<p>The following headings describe the options.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>Allow Anonymous requests (no action)<\/strong><\/h6>\n\n\n\n<p>This option delays authorization of unauthenticated traffic to your application code. And, for authenticated requests, App Service passes along the authentication information in the HTTP headers. However, this option provides more flexibility in handling anonymous requests.&nbsp;<\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>Allow only authenticated requests<\/strong><\/h6>\n\n\n\n<p>The option is Log in with &lt;provider&gt;.&nbsp; However, App Service redirects all anonymous requests to \/.auth\/login\/&lt;provider&gt; for the provider you choose. And, if the anonymous request comes from a native mobile app, the returned response is an HTTP 401 Unauthorized. With this option, there is no need of writing any authentication code in your app. As finer authorization, such as role-specific authorization, can be handled by inspecting the user&#8217;s claims.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.testpreptraining.ai\/microsoft-azure-architect-design-az-304-practice-exam\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" width=\"961\" height=\"150\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/Az-304-online-course-18.png\" alt=\"Learn about Azure App Service using AZ-304 online course\" class=\"wp-image-14311\" srcset=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/Az-304-online-course-18.png 961w, https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/Az-304-online-course-18-750x117.png 750w\" sizes=\"auto, (max-width: 961px) 100vw, 961px\" \/><\/a><\/figure><\/div>\n\n\n\n<p class=\"has-text-align-right\"><strong>Reference: <\/strong><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/app-service\/overview-authentication-authorization#authorization-behavior\" target=\"_blank\" rel=\"noreferrer noopener\">Microsoft Documentation<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/www.testpreptraining.ai\/tutorial\/exam-az-304-microsoft-azure-architect-design\/\" target=\"_blank\" rel=\"noreferrer noopener\"><a href=\"https:\/\/www.testpreptraining.ai\/tutorial\/exam-az-304-microsoft-azure-architect-design\/\" target=\"_blank\" rel=\"noreferrer noopener\">Go back to AZ-304 Tutorials<\/a><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Go back to AZ-304 Tutorials In this article, we will learn about App Service for simplifying authentication and authorization for apps including details about Azure App Service. So, let\u2019s understand it. Azure App Services Azure App Service provides built-in authentication and authorization support by using which you can sign in users and access data by:&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-14309","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Authorization Approach in Azure App Service | Microsoft Azure AZ-304<\/title>\n<meta name=\"description\" content=\"Enhance your knowledge by learning about Authorization approach in Azure App Service using Microsoft Azure AZ-304 online course and practice exam Now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.testpreptraining.ai\/tutorial\/authorization-approach-in-azure-app-service\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Authorization Approach in Azure App Service | Microsoft Azure AZ-304\" \/>\n<meta property=\"og:description\" content=\"Enhance your knowledge by learning about Authorization approach in Azure App Service using Microsoft Azure AZ-304 online course and practice exam Now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/authorization-approach-in-azure-app-service\/\" \/>\n<meta property=\"og:site_name\" content=\"Testprep Training Tutorials\" \/>\n<meta property=\"article:modified_time\" content=\"2020-08-27T06:40:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/08\/AZ-304-practice-tests-3.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/authorization-approach-in-azure-app-service\/\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/authorization-approach-in-azure-app-service\/\",\"name\":\"Authorization Approach in Azure App Service | Microsoft Azure AZ-304\",\"isPartOf\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\"},\"datePublished\":\"2020-07-30T11:39:28+00:00\",\"dateModified\":\"2020-08-27T06:40:54+00:00\",\"description\":\"Enhance your knowledge by learning about Authorization approach in Azure App Service using Microsoft Azure AZ-304 online course and practice exam Now!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/authorization-approach-in-azure-app-service\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.testpreptraining.ai\/tutorial\/authorization-approach-in-azure-app-service\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/authorization-approach-in-azure-app-service\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authorization Approach in Azure App Service\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"name\":\"Testprep Training Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\",\"name\":\"Testprep Training\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"contentUrl\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"width\":583,\"height\":153,\"caption\":\"Testprep Training\"},\"image\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Authorization Approach in Azure App Service | Microsoft Azure AZ-304","description":"Enhance your knowledge by learning about Authorization approach in Azure App Service using Microsoft Azure AZ-304 online course and practice exam Now!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.testpreptraining.ai\/tutorial\/authorization-approach-in-azure-app-service\/","og_locale":"en_US","og_type":"article","og_title":"Authorization Approach in Azure App Service | Microsoft Azure AZ-304","og_description":"Enhance your knowledge by learning about Authorization approach in Azure App Service using Microsoft Azure AZ-304 online course and practice exam Now!","og_url":"https:\/\/www.testpreptraining.ai\/tutorial\/authorization-approach-in-azure-app-service\/","og_site_name":"Testprep Training Tutorials","article_modified_time":"2020-08-27T06:40:54+00:00","og_image":[{"url":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/08\/AZ-304-practice-tests-3.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/authorization-approach-in-azure-app-service\/","url":"https:\/\/www.testpreptraining.ai\/tutorial\/authorization-approach-in-azure-app-service\/","name":"Authorization Approach in Azure App Service | Microsoft Azure AZ-304","isPartOf":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website"},"datePublished":"2020-07-30T11:39:28+00:00","dateModified":"2020-08-27T06:40:54+00:00","description":"Enhance your knowledge by learning about Authorization approach in Azure App Service using Microsoft Azure AZ-304 online course and practice exam Now!","breadcrumb":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/authorization-approach-in-azure-app-service\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.testpreptraining.ai\/tutorial\/authorization-approach-in-azure-app-service\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/authorization-approach-in-azure-app-service\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.testpreptraining.ai\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Authorization Approach in Azure App Service"}]},{"@type":"WebSite","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","name":"Testprep Training Tutorials","description":"","publisher":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization","name":"Testprep Training","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","contentUrl":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","width":583,"height":153,"caption":"Testprep Training"},"image":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/14309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/comments?post=14309"}],"version-history":[{"count":4,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/14309\/revisions"}],"predecessor-version":[{"id":18207,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/14309\/revisions\/18207"}],"wp:attachment":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media?parent=14309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/categories?post=14309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/tags?post=14309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}