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:
Type | Examples |
---|---|
UI Errors | “An error has occurred”, “Page not found”, broken components |
Authentication Errors | Login redirection failures, token issues |
Permission Issues | “You don’t have permission”, missing data |
Dataverse Errors | Failed API calls, plugin exceptions |
Code/Customization Errors | JavaScript errors, Liquid rendering issues |
Web Role / Security Errors | Role not assigned, form not loading |
Performance Issues | Long 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
Tool | Use |
---|---|
Browser Dev Tools (F12) | Inspect AJAX, JavaScript, Console logs |
Portal Checker | Quick validation of setup |
Trace Log Viewer (XrmToolBox) | Plugin log analysis |
Application Insights | Advanced telemetry and logging |
Liquid Preview Tool | Preview Liquid code separately |
FetchXML Tester | Test and debug data queries |
Site Setting Viewer | Inspect 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
andFooter
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