![]()
Managing site logs and telemetry is a crucial part of operating and maintaining Power Pages (Power Apps Portals). It helps in monitoring performance, tracking issues, analyzing usage patterns, and enhancing security. This guide walks you through the step-by-step process of enabling, accessing, and managing logs and telemetry data using tools like Power Platform Admin Center, Azure Application Insights, and Power Platform CLI (PAC CLI).
Why Manage Site Logs and Telemetry?
- Troubleshoot issues: See HTTP errors, failed requests, dependency issues
- Performance monitoring: Track page load times, server response times
- Security auditing: Identify suspicious access attempts or login failures
- Usage analytics: Understand how users interact with your portal
- Automated alerts: Get notified about key failures or traffic anomalies
Prerequisites
- You must be an Administrator in the Power Platform environment
- Portal should already be provisioned and in a working state
- Access to Azure Portal (for enabling Application Insights)
- Power Platform CLI installed if managing via command line
Step-by-Step Guide: Managing Logs and Telemetry in Power Pages
Step 1: Enable Diagnostic Logging (Application Insights)
- Go to Power Platform Admin Center
URL: https://admin.powerplatform.microsoft.com - Select your environment
- Under Resources, click Portals and select your portal
- Click Manage on the portal record
- Scroll to Set up Application Insights
- Choose:
- Create new resource (or select existing Application Insights instance)
- It will link to Azure Application Insights which will collect telemetry data
- Click Save
This will activate logging to Application Insights for your portal.
Step 2: Access and Analyze Logs in Azure Application Insights
- Open Azure Portal – https://portal.azure.com
- Navigate to Application Insights > select the resource linked to your portal
- Use Features like:
- Live Metrics: View real-time telemetry
- Failures: Shows failed requests and exceptions
- Performance: Measures response times and load times
- Logs (Analytics): Run Kusto Queries (KQL) to get insights
- Example KQL queries:
- Get failed requests
requests
| where success == false
| order by timestamp desc
- Check page views
pageViews
| summarize count() by url, bin(timestamp, 1h)
- Track user sessions
customEvents
| where name == "UserLogin"
| project timestamp, user_Id
Step 3: Enable Site Logs in Power Platform CLI
If you want to manage logs via command line:
- Authenticate to your environment:
pac auth create --url https://yourorg.crm.dynamics.com `
--applicationId <client-id> `
--clientSecret <client-secret> `
--tenant <tenant-id>
- Download portal configuration (to access site settings and logging):
pac paportal download --path "./PortalLogs"
- Check for or modify Site Settings:
- Name:
ApplicationInsightsInstrumentationKey - Value:
<your-AI-key>
This links your portal with Azure Application Insights manually.
Step 4: Monitor with Built-in Portal Diagnostics Tool
- Open your portal website in browser
- Append this to the URL:
?portalDiagnostics=true
Example:
https://yourportal.powerappsportals.com/?portalDiagnostics=true
- You’ll get a Diagnostics panel with:
- Request timings
- Cache hits
- Page details
- Fetch performance
This is useful during development and testing.
Step 5: Automate Monitoring and Alerts in Application Insights
In Azure Application Insights:
- Go to Alerts → + New Alert Rule
- Define:
- Scope: Your portal resource
- Condition: Example – Failed requests > 5 in 5 mins
- Action Group: Email or webhook alert
- Save the rule to automate notifications.
Step 6: Export Telemetry Data (Optional)
You can export telemetry data to:
- Log Analytics Workspace
- Azure Blob Storage
- Event Hubs for streaming
This allows long-term storage or downstream processing with tools like Power BI.
To configure export:
- Go to Application Insights > Diagnostic settings
- Add a new destination
- Choose your export method (e.g., Log Analytics)
Best Practices
- Enable logging early in the lifecycle (Dev & Prod)
- Keep logs for minimum 90 days to allow sufficient investigation
- Set up role-based access in Azure for log access
- Monitor daily reports or dashboards via Application Insights
- Use anomaly detection in Azure for proactive responses
Common Site Settings Related to Logging
| Setting Name | Purpose |
|---|---|
ApplicationInsightsInstrumentationKey | Links to AI instance |
EnableDiagnosticsLogging | Enables server-side diagnostics |
EnableTelemetryTracking | Tracks usage patterns and performance |
PortalTelemetryOptIn | Enables portal-wide telemetry |
You can add/edit these via Power Apps portal editor under Site Settings or using Power Platform CLI.
