Viewing logs
The App Store for Intune uses multiple logging destinations. Each serves a different purpose.
Application Insights (recommended)
Section titled “Application Insights (recommended)”Best for: Detailed error traces, background service logs, performance monitoring
Location: Azure Portal → Your App Service → Application Insights → Logs
Common queries:
1. View recent errors (last 1 hour)
traces| where severityLevel >= 3 // Warning, Error, Critical| where timestamp > ago(1h)| order by timestamp desc| project timestamp, severityLevel, message, operation_Name| take 1002. Packaging service logs
traces| where message contains "PackagingQueueService"| order by timestamp desc| take 1003. Search for specific package errors
Replace Google.GoogleDrive with your package ID:
traces| where message contains "Google.GoogleDrive"| order by timestamp desc| take 504. View all logs for a specific job ID
Replace abc123 with your job ID:
traces| where message contains "abc123"| order by timestamp desc| take 1005. WinGet cache background service
traces| where message contains "WingetCacheStreamingService"| order by timestamp desc| take 1006. Failed requests (500 errors)
requests| where resultCode >= 500| where timestamp > ago(1h)| order by timestamp desc| take 50App Service log stream
Section titled “App Service log stream”Best for: Real-time monitoring, startup issues, general web app logs
Azure CLI:
# Enable logging (one-time setup)az webapp log config \ --name <your-app-name> \ --resource-group <your-resource-group> \ --application-logging filesystem \ --level verbose
# View live logsaz webapp log tail \ --name <your-app-name> \ --resource-group <your-resource-group>Azure Portal:
- Go to your App Service
- Select Log stream from the left menu
- Choose Application Logs
Note: Background services (packaging, cache refresh) may not appear in log stream. Use Application Insights for those.
Packaging job status
Section titled “Packaging job status”Best for: Quick status check, user-facing error messages
Location: Admin Dashboard → Packaging Jobs tab
What you see:
- Job ID
- Package ID
- Status (Pending, Downloading, Packaging, Uploading, Completed, Failed)
- Error message (if failed)
- Start/completion time
Limitations:
- Error messages may be truncated
- Detailed stack traces not shown
- For full error details, use Application Insights
Example job statuses:
| Status | Description |
|---|---|
| Pending | Job queued, waiting to be processed |
| Downloading | Downloading installer from WinGet repository |
| Packaging | Creating .intunewin package |
| Uploading | Uploading package to Intune |
| Completed | Successfully published to Intune |
| Failed | Error occurred (see error message) |
Background service logs
Section titled “Background service logs”Background services run independently of HTTP requests. Their logs appear in Application Insights, not the live log stream.
Services that run in the background:
- PackagingQueueService - Processes WinGet packaging jobs
- WingetCacheStreamingService - Refreshes cached packages daily
- RequestEscalationService - Escalates stale approval requests
- AppSyncService - Syncs apps from Intune
- LicenseValidationService - Validates PowerStacks license
How to view:
Use Application Insights with service-specific queries:
// Packaging servicetraces| where message contains "PackagingQueueService"| order by timestamp desc| take 100
// Cache refresh servicetraces| where message contains "WingetCacheStreamingService"| order by timestamp desc| take 100
// Request escalation servicetraces| where message contains "RequestEscalationService"| order by timestamp desc| take 100Verifying Application Insights is enabled
Section titled “Verifying Application Insights is enabled”Application Insights is critical for monitoring and troubleshooting. Follow these steps to verify it’s enabled and working:
1. Check if Application Insights resource exists
Azure Portal → Resource Group → Look for resource named like apprequest-insights-{uniqueId}
If missing, the ARM template deployment may have failed. Redeploy using the latest template.
2. Verify connection string is set
Azure CLI:
# View all app settingsaz webapp config appsettings list \ --name <your-app-name> \ --resource-group <your-resource-group> \ --query "[?name=='APPLICATIONINSIGHTS_CONNECTION_STRING']"Azure Portal:
- Go to your App Service
- Settings → Environment variables
- Look for
APPLICATIONINSIGHTS_CONNECTION_STRING - Value should start with
InstrumentationKey=...
If missing: The ARM template sets this automatically. If deploying manually, copy the connection string from the Application Insights resource.
3. Verify Application Insights is not disabled
Azure Portal:
- Go to your App Service
- Settings → Application Insights
- Ensure it shows “Connected” or “Enabled”
- If it says “Disabled”:
- Select “Turn on Application Insights”
- Select your existing Application Insights resource
- Select “Apply”
4. Test if logs are flowing
A. Check startup logs:
traces| where message contains "Application Insights"| order by timestamp desc| take 10You should see a message like:
Application Insights is configured with connection string: InstrumentationKey=...B. Generate test traffic:
- Visit your portal homepage
- Go to a few pages
- Wait 2-3 minutes for logs to appear
C. Query for recent activity:
requests| where timestamp > ago(10m)| order by timestamp desc| take 20If you see results, Application Insights is working correctly.
5. Common issues
No logs appearing:
- Wait 2-5 minutes - There’s a delay before logs appear
- Check if the connection string is set correctly
- Restart the App Service to reinitialize Application Insights
- Verify the Application Insights resource isn’t disabled or deleted
“Application Insights was disabled” message:
- This can happen if you manually disabled it in the portal
- Follow step 3 above to re-enable it
- The ARM template configures it automatically on deployment
Connection string present but no data:
- Verify the connection string matches the Application Insights resource
- Check if the Application Insights resource has any data (Portal → Application Insights → Logs)
- Restart the App Service
6. Manual configuration (if needed)
If Application Insights isn’t working after deployment:
# Get the connection string from Application Insightsaz monitor app-insights component show \ --app <insights-name> \ --resource-group <resource-group> \ --query "connectionString" -o tsv
# Set it in App Serviceaz webapp config appsettings set \ --name <app-name> \ --resource-group <resource-group> \ --settings APPLICATIONINSIGHTS_CONNECTION_STRING="<connection-string>"
# Restart the appaz webapp restart \ --name <app-name> \ --resource-group <resource-group>