Skip to content
Rishan Solutions
Rishan Solutions
  • PowerApps
  • SharePoint online
    • Uncategorized
    • Uncategorized
  • PowerAutomate
Rishan Solutions
Latest Posts
  • Agentic AI: The Dawn of Autonomous Intelligence Revolutionizing 2025 June 24, 2025
  • Recursive Queries in T-SQL May 7, 2025
  • Generating Test Data with CROSS JOIN May 7, 2025
  • Working with Hierarchical Data May 7, 2025
  • Using TRY_CAST vs CAST May 7, 2025
  • Dynamic SQL Execution with sp_executesql May 7, 2025

Troubleshooting portal errors

Posted on April 15, 2025April 15, 2025 by Rishan Solutions

Loading

Troubleshooting errors in Microsoft Power Pages (formerly Power Apps Portals) is a critical part of maintaining a healthy and reliable portal. Since Power Pages are tightly integrated with Dataverse, authentication providers, web roles, and more, errors can stem from various sources — including configuration issues, permission mismatches, plugin exceptions, or custom code bugs.

This guide provides a comprehensive, step-by-step breakdown of how to identify, diagnose, and fix common errors in Power Pages.


1. Understand the Error Landscape

Errors in Power Pages can be classified into categories:

TypeExamples
UI Errors“An error has occurred”, “Page not found”, broken components
Authentication ErrorsLogin redirection failures, token issues
Permission Issues“You don’t have permission”, missing data
Dataverse ErrorsFailed API calls, plugin exceptions
Code/Customization ErrorsJavaScript errors, Liquid rendering issues
Web Role / Security ErrorsRole not assigned, form not loading
Performance IssuesLong load times, session timeouts

2. Enable Portal Error Logging

Step 1: Enable “Enable Diagnostic Logging”

Go to:

  • Power Pages Management App → Site Settings
  • Add or update the following setting:
textCopyEditName:  EnableDiagnosticLogging
Value: true

This shows verbose error messages to system administrators only.

Step 2: Enable Plugin Trace Logging (for Dataverse Plugins)

  • Go to Power Platform Admin Center
  • Choose Environment → Settings → Plug-ins
  • Enable plugin trace logging to All or Exceptions Only

3. Access Portal Error Logs

Method 1: Using “Portal Checker” Tool

Power Pages admin center → Diagnostics → Portal Checker

It automatically identifies:

  • Missing permissions
  • Broken data references
  • Plugin errors
  • Misconfigured authentication

Method 2: View Event Viewer in Azure App Insights (if enabled)

If Application Insights is integrated:

  • Go to Azure Portal → Application Insights resource
  • Run queries to analyze errors, e.g.
kustoCopyEdittraces
| where message contains "Exception"
| order by timestamp desc

4. Common Errors & Fixes

A. Page Not Found (404)

Cause:

  • Web Page is unpublished or incorrect URL
  • Parent page missing or access denied

Fix:

  • Check if the Web Page is Published
  • Ensure the URL path matches the navigation
  • Verify that user has correct Web Role

B. “You Do Not Have Permission to View This Page”

Cause:

  • Anonymous or logged-in user lacks required Web Role
  • Table Permissions are not defined

Fix:

  • Assign appropriate Web Roles to the user
  • Link Web Role with Web Page Access Control Rule
  • Ensure Table Permissions allow Read/Create/Update

C. Form Not Loading / Entity Permissions Error

Cause:

  • Missing Table Permissions for the current user
  • Related tables (lookups) not allowed

Fix:

  • Navigate to Power Pages Management App → Table Permissions
  • Add missing table and assign Web Role
  • For lookups, use the Parent Scope or create separate permission entries

D. Internal Server Error / Red Error Banner

Cause:

  • Plugin throwing exception
  • JavaScript or Liquid code issue
  • FetchXML errors

Fix:

  • Use the Plugin Trace Log to see details
  • Check browser Developer Console (F12) for JavaScript errors
  • Review custom Liquid in Web Templates, Content Snippets, or Forms

E. Login Not Working / Azure B2C Redirect Fails

Cause:

  • Azure AD B2C misconfiguration
  • Wrong redirect URI or client secret

Fix:

  • Recheck Azure B2C setup: correct domain, tenant ID, and app registration
  • Confirm Redirect URI in Azure = your portal URL + /signin-aadb2c

F. API Calls (Web API) Fail with 403 or 401

Cause:

  • Web API not enabled
  • User lacks Table Permissions
  • CORS or token issues

Fix:

  • Ensure Table Permissions exist with right Web Role
  • Enable Web API in Site Settings:
    • WebAPI/Enabled = true
  • Use X-CSRF-TOKEN header in AJAX

5. Tools and Methods for Debugging

ToolUse
Browser Dev Tools (F12)Inspect AJAX, JavaScript, Console logs
Portal CheckerQuick validation of setup
Trace Log Viewer (XrmToolBox)Plugin log analysis
Application InsightsAdvanced telemetry and logging
Liquid Preview ToolPreview Liquid code separately
FetchXML TesterTest and debug data queries
Site Setting ViewerInspect and manage portal site settings

6. Debugging JavaScript Errors

  • Open browser → F12 → Console tab
  • Look for:
    • Uncaught ReferenceError
    • Cannot read property of undefined
  • Fix broken selectors or functions
  • Confirm libraries like jQuery or Bootstrap are loaded before custom scripts

7. Debugging Liquid Errors

Liquid syntax errors might not show explicitly. Look for:

  • Unclosed {% if %} blocks
  • Incorrect variable names
  • Referencing a null object

Example Mistake:

{{ entity.name.toUpperCase }}   ← invalid

Fix:

{{ entity.name | upcase }}

8. Debugging FetchXML Errors

  • Use FetchXML builder to test
  • Common errors:
    • Incorrect field names
    • Incompatible joins
    • Missing security permissions

9. Portal Not Loading (Blank Screen)

Cause:

  • Script load failure
  • Incorrect web template structure
  • Overwritten default layout

Fix:

  • Open console and check failed network requests
  • Revert to default Header and Footer templates
  • Temporarily remove custom JavaScript for isolation

10. Best Practices for Prevention

  • Test changes in a sandbox portal
  • Use site setting EnableDebugMode to trace Web Template output
  • Add logging in plugin code using tracingService.Trace()
  • Use role-based permissions instead of user-specific access
  • Avoid long scripts directly in web pages
  • Implement fallback UI for errors
  • Document all Web Roles, Forms, and Page Access Rules
Posted Under Power PagesAuthentication Issues Azure B2C login errors Dataverse Developer Tools diagnostic logging FetchXML errors JavaScript debugging Liquid errors plugin trace log portal checker portal errors portal performance Power Apps Portals Power Pages Power Platform debugging Site settings Table Permissions Troubleshooting Web API errors web page access errors Web Roles

Post navigation

Custom plugin execution from Power Pages
Not correlating logs across services

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Agentic AI: The Dawn of Autonomous Intelligence Revolutionizing 2025
  • Recursive Queries in T-SQL
  • Generating Test Data with CROSS JOIN
  • Working with Hierarchical Data
  • Using TRY_CAST vs CAST

Recent Comments

  1. Michael Francis on Search , Filter and Lookup in power apps
  2. A WordPress Commenter on Hello world!

Archives

  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • March 2024
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • June 2023
  • May 2023
  • April 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • January 2022

Categories

  • Active Directory
  • AI
  • AngularJS
  • Blockchain
  • Button
  • Buttons
  • Choice Column
  • Cloud
  • Cloud Computing
  • Data Science
  • Distribution List
  • DotNet
  • Dynamics365
  • Excel Desktop
  • Extended Reality (XR) – AR, VR, MR
  • Gallery
  • Icons
  • IoT
  • Java
  • Java Script
  • jQuery
  • Microsoft Teams
  • ML
  • MS Excel
  • MS Office 365
  • MS Word
  • Office 365
  • Outlook
  • PDF File
  • PNP PowerShell
  • Power BI
  • Power Pages
  • Power Platform
  • Power Virtual Agent
  • PowerApps
  • PowerAutomate
  • PowerPoint Desktop
  • PVA
  • Python
  • Quantum Computing
  • Radio button
  • ReactJS
  • Security Groups
  • SharePoint Document library
  • SharePoint online
  • SharePoint onpremise
  • SQL
  • SQL Server
  • Template
  • Uncategorized
  • Variable
  • Visio
  • Visual Studio code
  • Windows
© Rishan Solutions 2025 | Designed by PixaHive.com.
  • Rishan Solutions