web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Display "Page Not Foun...
Power Pages
Answered

Display "Page Not Found" when an anonymous user accesses a page to which they do not have permission

(0) ShareShare
ReportReport
Posted on by

Hello.

 

I would like to configure the following about Power Apps Portals, and I was wondering if you know anything about it.

 

I have set the permissions for a particular page to only allow "Administrators" and "Authenticated Users".
This page will only be accessible by "Administrators" and "Authenticated Users", but not by "Anonymous Users".

 

If you try to access this page as an "anonymous user", you will get an error like the following
I would like to change this so that "Page Not Found" or "Access Denied" is displayed instead of an error.

 

Is such a setting possible?

 

[Displayed custom error page]

image.png

Categories:
I have the same question (0)
  • OOlashyn Profile Picture
    3,496 Most Valuable Professional on at

    Hi @nanoka ,

    If the user doesn't have access to the page it should automatically be shown an access denied message, not an error. In your case, something definitely went wrong. You need to find out what exactly error you get. For that, you can disable custom error messages or configure logging.

  • nanoka Profile Picture
    on at

    @OOlashyn 

    Thank you so much for your help.

    I have disabled custom errors and checked the errors shown.
    Is there anything you can think of about the errors that are showing up?

     

    nanoka_0-1636522161104.png

     

    Server Error in '/' Application. The route handler 'Adxstudio.Xrm.Web.Routing.PortalRouteHandler' did not return an IHttpHandler from its GetHttpHandler() method. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: The route handler 'Adxstudio.Xrm.Web.Routing.PortalRouteHandler' did not return an IHttpHandler from its GetHttpHandler() method. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [InvalidOperationException: The route handler 'Adxstudio.Xrm.Web.Routing.PortalRouteHandler' did not return an IHttpHandler from its GetHttpHandler() method.] System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +623 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +223 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +220 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +94

     

     

    Also, I have a feeling that "Access Denied" is simply not working properly. Is there a setting to enable "Access Denied", especially if I have not changed the default configuration?


    If so, please let me know.

  • Verified answer
    nanoka Profile Picture
    on at

    This was a problem I had been struggling with for a long time, but it was solved.

    The problem was solved by changing the Page Template of the Access Denied page, as shown in the following page.

    Thanks!


    Solved: Portal error when enabling Web page Access Control... - Power Platform Community (microsoft.com)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Pages

#1
DP_Prabh Profile Picture

DP_Prabh 29

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 25 Most Valuable Professional

#3
Hammed Profile Picture

Hammed 22

Last 30 days Overall leaderboard