Require authentication on Power Apps Portals - block anonymous access

Internal usage of Power Apps portals is included in all Power Apps licenses and in many Dynamics 365 licenses. This means that any internal user in your organization (user account in your tenant) has unlimited access to the Power Apps Portals in any Common Data Service environment they already have access to.

Anonymous access to the Power Apps Portals requires an add-on though, which is an additional US$100 extra per month, per 100K anonymous page views.

But maybe you don't want the portal to be accessible to anonymous users (a.k.a. the general public)

Of course this also applies if you want external users to access the portal, though that would still require the Login Capacity add-on (US$200/month/100 logins)

Configure the portal to require authentication for all visitor

Follow these steps to restrict access to the whole portal and only allow authenticated users.

  1. In the Portal Administration app (model-driven app), go to Web Pages and find the homepage. This is typically the page called Home and should be the only page with Partial URL set to just /
  2. Switch to the Access Control Rules tab and add a new Web Page Access Control Rule
  3. Enter a name for this rule (you can enter any name you want) and set the Right to Restrict Read
  4. Switch to the Web Roles tab and add the Authenticated Users role. This means that only users with that role will be able to access the homepage. This automatically excludes all anonymous users. (All authenticated users always have the Authenticated Users role)

That's it.
Your portal is now secured. Every time any anonymous user tries to access your portal, they will be force redirected to the sign in page.

When you add a Web Page Access Control Rule to the homepage, this will be inherited by all other pages, because all other pages are considered below the homepage and thus inherit this rule.