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, searching past events
Location: In the Azure portal, go to your Application Insights resource (for example, ai-apprequest-prod) and select Logs.
Common queries:
1. View recent errors (last 1 hour)
traces| where severityLevel >= 3 // 3 = Error, 4 = Critical| where timestamp > ago(1h)| order by timestamp desc| project timestamp, severityLevel, message, operation_Name| take 1002. Packaging service logs
traces| where tostring(customDimensions.CategoryName) endswith "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. Follow one packaging job
When a packaging job changes status, App Store records a PackagingJob.StatusChanged event with the job ID. Replace Google.GoogleDrive with your package ID:
customEvents| where name == "PackagingJob.StatusChanged"| where tostring(customDimensions.WingetPackageId) == "Google.GoogleDrive"| project timestamp, JobId = tostring(customDimensions.JobId), PreviousStatus = tostring(customDimensions.PreviousStatus), NewStatus = tostring(customDimensions.NewStatus), ErrorMessage = tostring(customDimensions.ErrorMessage)| order by timestamp descFor an app you uploaded, filter on the app’s name instead: where tostring(customDimensions.PackageName) has "<app name>".
To see everything logged for that job, replace <job ID> with a JobId from the results:
traces| where message contains "<job ID>"| order by timestamp desc| take 1005. WinGet cache background service
traces| where tostring(customDimensions.CategoryName) endswith "WingetCacheStreamingService"| order by timestamp desc| take 1006. Failed requests (500 errors)
requests| where toint(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 Monitoring > Log stream.
Note: Background services (packaging, cache refresh) write to the log stream too, but the stream shows only what’s happening now. To search earlier logs, use Application Insights.
Packaging job status
Section titled “Packaging job status”Best for: Quick status check, user-facing error messages
Location: In the admin portal, go to Apps > App Catalog and scroll to Packaging Jobs.
What you see: The 50 most recent jobs, with these columns:
- Package: the app’s name, with its publisher or package ID
- Source
- Version
- Status, with the error message if the job failed
- Created: when the job was created, and by whom
- Actions: Retry and Delete for a failed job, and Cancel for a job that’s still running
Limitations:
- Long error messages are shortened in the table. Select Copy next to the message to copy the full text.
- 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 |
| Creating | Creating the Win32 app in 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 the log stream while they run, and in Application Insights, where you can search them later.
Some of the services that run in the background:
- PackagingQueueService: processes packaging jobs
- WingetCacheStreamingService: refreshes the App Catalog daily
- RequestEscalationService: escalates stale approval requests
- IntuneSyncService: syncs apps from Intune every hour, with a full sync every night at 02:00 UTC
- InstallStatusPollingService: checks Intune for the install status of delivered requests
- ApprovalReminderService: sends reminders for requests waiting for approval
- RingProgressionService: moves update deployments through their rings
How to view:
Use Application Insights. Each service’s logs carry its name in CategoryName:
// Packaging servicetraces| where tostring(customDimensions.CategoryName) endswith "PackagingQueueService"| order by timestamp desc| take 100
// Cache refresh servicetraces| where tostring(customDimensions.CategoryName) endswith "WingetCacheStreamingService"| order by timestamp desc| take 100
// Request escalation servicetraces| where tostring(customDimensions.CategoryName) endswith "RequestEscalationService"| order by timestamp desc| take 100
// Intune sync servicetraces| where tostring(customDimensions.CategoryName) endswith "IntuneSyncService"| order by timestamp desc| take 100Device Logs
Section titled “Device Logs”Some problems happen on the device, not in App Store. These logs are on the device:
| Log | Location | What it records |
|---|---|---|
AppStore-Detection.log | %ProgramData%\PowerStacks\AppStore\Logs when the script runs as SYSTEM, or %TEMP%\PowerStacks\AppStore\Logs when it runs as the user | What the detection script found when Intune checked whether the app is installed |
AppStore-Uninstall.log | The same folders as AppStore-Detection.log | Which app the uninstall script chose to remove, and the uninstaller’s exit code |
<app name>_Install.log, <app name>_Uninstall.log | C:\ProgramData\Microsoft\IntuneManagementExtension\Logs | The verbose Windows Installer log for an MSI app that App Store installs or removes with msiexec |
When AppStore-Detection.log or AppStore-Uninstall.log reaches 5 MB, App Store renames it with the extension .lo_ and starts a new one. Collecting diagnostics from the device in the Microsoft Intune admin center includes the IntuneManagementExtension\Logs folder.
Store Health, the Activity Log, and the Audit Trail
Section titled “Store Health, the Activity Log, and the Audit Trail”The admin portal has three places to check before you open the logs:
- Reports > Store Health runs App Store’s health checks, such as the database and the managed identity’s Microsoft Graph permissions, and shows request and failure counts from the App Store database. It doesn’t read Application Insights. See Reports and Analytics.
- Reports > Activity Log shows the history of packaging jobs and update deployments.
- Reports > Analytics > Audit Trail shows the audit log: who did what in App Store, and when. See Reports and Analytics.
Verifying 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
In the Azure portal, go to your resource group and look for the Application Insights resource. The deployment template names it ai-apprequest-<environment>, which is ai-apprequest-prod for an Azure Marketplace deployment.
If it’s missing, create an Application Insights resource and set its connection string as described in step 6. Don’t redeploy the template over an existing installation: redeploying replaces the App Service’s application settings, including settings that App Store or an administrator changed after deployment.
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.
- Select 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. The connection string is what matters
App Store sends telemetry from its own code when APPLICATIONINSIGHTS_CONNECTION_STRING is set. You don’t need to turn on Application Insights in the App Service’s Application Insights settings, and that page can show it as not enabled while App Store sends telemetry normally.
4. Test if logs are flowing
A. Check startup logs:
When App Store starts, it writes a line to the log stream (not to Application Insights) that says whether the connection string is set. In the log stream, look for:
Application Insights is configured with connection string: InstrumentationKey=...If the log stream shows WARNING: Application Insights connection string is not set. Telemetry will not be collected. instead, set the connection string as described in step 6.
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:
- The App Service’s Application Insights settings page can say this even when App Store is sending telemetry, because App Store doesn’t use that setting.
- Check the connection string as described in step 2, and query for recent activity as described in step 4.
Connection string present but no data:
- Verify the connection string matches the Application Insights resource
- Check if the Application Insights resource has any data: in the Azure portal, go to the Application Insights resource and select 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>