{"id":39154,"date":"2020-05-09T07:34:11","date_gmt":"2020-05-09T14:34:11","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/premier-developer\/?p=39154"},"modified":"2022-09-09T09:41:12","modified_gmt":"2022-09-09T16:41:12","slug":"control-access-to-power-apps-and-power-automate-with-azure-ad-conditional-access-policies","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/premier-developer\/control-access-to-power-apps-and-power-automate-with-azure-ad-conditional-access-policies\/","title":{"rendered":"Control Access to Power Apps and Power Automate with Azure AD Conditional Access Policies"},"content":{"rendered":"<p>App Dev Manager <a href=\"https:\/\/www.linkedin.com\/in\/roger-lamb-b0782878\/\">Roger Lamb<\/a> and Dev Consultant <a href=\"https:\/\/www.linkedin.com\/in\/adamtoth\/\">Adam Toth<\/a> detail how to control access to Power Apps and Power Automate using Azure AD Conditional Access Policies.<\/p>\n<p><strong>UPDATE 9\/9\/2022:<\/strong> Microsoft Product Support requested an update to this article to indicate that blocking only one of these products at a time could introduce various issues and is not supported.\u00a0 If you are going to use this policy to block Power Platform features, make sure you block both Power Automate and Power Apps at the same time. The reason is that some features of one application are dependencies for another, for example some Power Automate UI features require Power Apps functionality under the cover to work (Solutions, Dataverse, etc), and those UI operations may fail if you block Power Apps but try and use the Power Automate Portal.<\/p>\n<hr \/>\n<h2>Overview<\/h2>\n<p>As companies begin adoption of Microsoft 365 citizen developer platforms, such as Microsoft Power Apps and Power Automate (Flow), there is a growing demand to control access to these platforms. Governance and administration best-practices are paramount to ensuring only authorized users have access to critical systems. When combined with multiple organizations and users, varying levels of access, and the need for user-level permissions, maintaining Power Apps and Power Automate solutions may be a challenge.<\/p>\n<p>Each Microsoft 365 tenant has a default environment provisioned for use with PowerApps and Power Automate, where any licensed user can contribute Power Apps and Power Automate workflows immediately. There is currently no mechanism to restrict the Maker role (i.e. who can create Power Apps and Power Automate workflows) in the Default environment, so many companies look for the ability to limit access to these systems until a fully-featured governance and administration process is put in place, or until the platform has been vetted through pilot rollouts to limited numbers of users.<\/p>\n<p>Fortunately, this can easily be achieved using Microsoft Azure Active Directory (AD) Conditional Access Policies.<\/p>\n<h2>About Conditional Access Policies<\/h2>\n<p>Conditional Access Policies in Azure AD are a flexible way for administrators to control access to Microsoft-based services for end users. The diagram below illustrates how to wire up Conditional Access policies to restrict access to end users for both PowerApps and Power Automate.<\/p>\n<p>Conditional Access policies at their simplest form are if-then statements: if a user wants to access a resource, then they must complete an action.<\/p>\n<p><img decoding=\"async\" width=\"884\" height=\"359\" class=\"wp-image-39155\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-44.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-44.png 884w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-44-300x122.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-44-768x312.png 768w\" sizes=\"(max-width: 884px) 100vw, 884px\" \/><\/p>\n<p>Find out more about Conditional Access (CA) policies <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/active-directory\/conditional-access\/overview\">here<\/a>.<\/p>\n<p>Conditional Access Policies are available to tenants that subscribe to Azure AD Premium capabilities, including Azure AD Premium P1, P2, or <a href=\"https:\/\/docs.microsoft.com\/en-us\/office365\/servicedescriptions\/microsoft-365-service-descriptions\/microsoft-365-business-service-description\">Microsoft 365 Business license<\/a>.<\/p>\n<p>For more information on comparisons of Azure Active Directory P1 and P2 licenses as well as pricing please review the documentation <a href=\"https:\/\/azure.microsoft.com\/pricing\/details\/active-directory\/\">here<\/a>.<\/p>\n<h2>Create a Conditional Access Policy<\/h2>\n<p>To create a Conditional Access Policy, first access the Azure portal and navigate to the Azure Active Directory blade. Access this through portal.azure.com or from the Admin Center links in the Office365 Administration Center.<\/p>\n<p><img decoding=\"async\" width=\"472\" height=\"410\" class=\"wp-image-39156\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-45.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-45.png 472w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-45-300x261.png 300w\" sizes=\"(max-width: 472px) 100vw, 472px\" \/><\/p>\n<p>Once in the Azure AD management blade, select <strong>Properties<\/strong>.<\/p>\n<p><img decoding=\"async\" width=\"480\" height=\"286\" class=\"wp-image-39157\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-46.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-46.png 480w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-46-300x179.png 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>On the Properties screen, select the <strong>Manage Security Defaults<\/strong> option at the bottom.<\/p>\n<p><img decoding=\"async\" width=\"836\" height=\"314\" class=\"wp-image-39158\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-47.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-47.png 836w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-47-300x113.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-47-768x288.png 768w\" sizes=\"(max-width: 836px) 100vw, 836px\" \/><\/p>\n<p><img decoding=\"async\" width=\"870\" height=\"916\" class=\"wp-image-39159\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-48.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-48.png 870w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-48-285x300.png 285w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-48-768x809.png 768w\" sizes=\"(max-width: 870px) 100vw, 870px\" \/><\/p>\n<p>Make sure that <strong>Enable Security defaults<\/strong> is <strong>off<\/strong> in order to use Conditional Access Policies.<\/p>\n<p>For more information about Security Defaults, see <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/active-directory\/fundamentals\/concept-fundamentals-security-defaults\">this link<\/a>.<\/p>\n<p>Once the defaults are turned off (they may already be off if Conditional Access has been used for other purposes, such as MFA and location-based access policies), the policy for accessing PowerApps and Power Automate (Flow) can be configured<\/p>\n<p>Return to the <strong>Azure Active Directory<\/strong> blade and select <strong>Security<\/strong>.<\/p>\n<p><img decoding=\"async\" width=\"480\" height=\"360\" class=\"wp-image-39160\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-49.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-49.png 480w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-49-300x225.png 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>In the next blade, select <strong>Conditional Access<\/strong>.<\/p>\n<p><img decoding=\"async\" width=\"496\" height=\"280\" class=\"wp-image-39161\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-50.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-50.png 496w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-50-300x169.png 300w\" sizes=\"(max-width: 496px) 100vw, 496px\" \/><\/p>\n<p>In the next screen, click the <strong>New policy<\/strong> button to create a new policy:<\/p>\n<p><img decoding=\"async\" width=\"968\" height=\"260\" class=\"wp-image-39162\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-51.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-51.png 968w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-51-300x81.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-51-768x206.png 768w\" sizes=\"(max-width: 968px) 100vw, 968px\" \/><\/p>\n<p>Name the new policy:<\/p>\n<p><img decoding=\"async\" width=\"610\" height=\"318\" class=\"wp-image-39163\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-52.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-52.png 610w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-52-300x156.png 300w\" sizes=\"(max-width: 610px) 100vw, 610px\" \/><\/p>\n<p>To configure a new Conditional Access Policy, 1) Define who\/what the policy applies to, and 2) Define what actions to take for anything that matches Step 1.<\/p>\n<p>Step 1. Configure the users that this new policy applies to. Under <strong>Assignments<\/strong>, select <strong>Users and Groups<\/strong>.<\/p>\n<p><img decoding=\"async\" width=\"574\" height=\"318\" class=\"wp-image-39164\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-53.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-53.png 574w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-53-300x166.png 300w\" sizes=\"(max-width: 574px) 100vw, 574px\" \/><\/p>\n<p>Select which users and groups to <strong>Include <\/strong>and <strong>Exclude <\/strong>from the new policy. In the following example, access to PowerApps and Flow is blocked for most users and is enabled only for <strong>Pilot <\/strong>users.<\/p>\n<p>Since the new policy is intended to block access to most users, for the <strong>Include <\/strong>setting, select <strong>All Users and Groups<\/strong>, and for the <strong>Exclude<\/strong> setting select any desired pilot users and any Power Platform services administrators that need to have access (and any break-glass accounts).<\/p>\n<p><strong>IMPORTANT NOTE: <\/strong>Be careful here to avoid locking out administrator. Check out <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/active-directory\/conditional-access\/best-practices\">this guide for best practices on configuring CA policies<\/a>, and <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/active-directory\/conditional-access\/howto-conditional-access-policy-block-access\">this guide for Block Access and exclusions<\/a>.\n<img decoding=\"async\" width=\"614\" height=\"982\" class=\"wp-image-39165\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-54.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-54.png 614w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-54-188x300.png 188w\" sizes=\"(max-width: 614px) 100vw, 614px\" \/><\/p>\n<p>Once the users have been configured, select the <strong>Cloud Apps<\/strong> that the new policy will apply to.<\/p>\n<p><img decoding=\"async\" width=\"1268\" height=\"828\" class=\"wp-image-39166\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-55.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-55.png 1268w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-55-300x196.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-55-1024x669.png 1024w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-55-768x502.png 768w\" sizes=\"(max-width: 1268px) 100vw, 1268px\" \/><\/p>\n<p>Click <strong>Select apps<\/strong> and then the arrow to select. In the search bar on the following screen, look first for <strong>PowerApps<\/strong>, and check it to select it, then search for <strong>Microsoft Flow<\/strong>, and select it as well. Both items should show as selected.<\/p>\n<p><img decoding=\"async\" width=\"691\" height=\"1317\" class=\"wp-image-39167\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-56.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-56.png 691w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-56-157x300.png 157w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-56-537x1024.png 537w\" sizes=\"(max-width: 691px) 100vw, 691px\" \/><\/p>\n<p>Click <strong>Select <\/strong>at the bottom of the screen. The two apps should now appear as part of the policy.<\/p>\n<p><img decoding=\"async\" width=\"644\" height=\"936\" class=\"wp-image-39168\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-57.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-57.png 644w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-57-206x300.png 206w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><\/p>\n<p>Step 2. Once the users have been configured, the next step to create the new policies is to define what to do when the conditions are met. In this case, the purpose of the policy is to block access to these apps for most users but allow access for pilot users and admins.<\/p>\n<p>Select the <strong>Grant<\/strong> option under <strong>Access controls <\/strong>and click the arrow.<\/p>\n<p><img decoding=\"async\" width=\"566\" height=\"354\" class=\"wp-image-39169\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-58.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-58.png 566w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-58-300x188.png 300w\" sizes=\"(max-width: 566px) 100vw, 566px\" \/><\/p>\n<p>In the <strong>Grant<\/strong> screen, select <strong>Block access<\/strong>.<\/p>\n<p><img decoding=\"async\" width=\"563\" height=\"929\" class=\"wp-image-39170\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-59.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-59.png 563w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-59-182x300.png 182w\" sizes=\"(max-width: 563px) 100vw, 563px\" \/><\/p>\n<p>The policy is now configured and ready for deployment. To activate the policy, select <strong>On<\/strong> under <strong>Enable Policy<\/strong>.<\/p>\n<p><img decoding=\"async\" width=\"552\" height=\"208\" class=\"wp-image-39171\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-60.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-60.png 552w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-60-300x113.png 300w\" sizes=\"(max-width: 552px) 100vw, 552px\" \/><\/p>\n<p>Once the new policy is on, if any users try and access PowerApps or Power Automate (Flow), they will receive the following message upon logging in:<\/p>\n<p><img decoding=\"async\" width=\"950\" height=\"738\" class=\"wp-image-39172\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-61.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-61.png 950w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-61-300x233.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/04\/word-image-61-768x597.png 768w\" sizes=\"(max-width: 950px) 100vw, 950px\" \/><\/p>\n<h2>Summary<\/h2>\n<p>With just a few quick steps using the Azure AD Conditional Access Policy, it is easy to limit access to PowerApps and Power Automate. This quick fix allows time for companies to evaluate the platform, experiment with pilot users, and take the time to implement governance and administration best practices.<\/p>\n<p>Additional resources for Power Platform governance and administration topics:<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/power-platform\/guidance\/coe\/starter-kit\">Power Platform CoE Starter Kit<\/a><\/li>\n<li><a href=\"https:\/\/aka.ms\/powerappsadminwhitepaper\">Power Platform Governance White Paper<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>With just a few quick steps using the Azure AD Conditional Access Policy, it is easy to limit access to PowerApps and Power Automate. This quick fix allows time for companies to evaluate the platform, experiment with pilot users, and take the time to implement governance and administration best practices.<\/p>\n","protected":false},"author":582,"featured_media":39173,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[9923],"tags":[6343,9925,9924,305,3],"class_list":["post-39154","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-power-platform","tag-aad","tag-conditional-access","tag-power-automate","tag-powerapps","tag-team"],"acf":[],"blog_post_summary":"<p>With just a few quick steps using the Azure AD Conditional Access Policy, it is easy to limit access to PowerApps and Power Automate. This quick fix allows time for companies to evaluate the platform, experiment with pilot users, and take the time to implement governance and administration best practices.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/39154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/users\/582"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/comments?post=39154"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/39154\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media\/39173"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media?parent=39154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/categories?post=39154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/tags?post=39154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}