Skip to content

Viewing Logs

Viewing Logs

The App Store for Intune uses multiple logging destinations. Each serves a different purpose.

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 100

2. Packaging service logs

traces
| where tostring(customDimensions.CategoryName) endswith "PackagingQueueService"
| order by timestamp desc
| take 100

3. Search for specific package errors Replace Google.GoogleDrive with your package ID:

traces
| where message contains "Google.GoogleDrive"
| order by timestamp desc
| take 50

4. 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 desc

For 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 100

5. WinGet cache background service

traces
| where tostring(customDimensions.CategoryName) endswith "WingetCacheStreamingService"
| order by timestamp desc
| take 100

6. Failed requests (500 errors)

requests
| where toint(resultCode) >= 500
| where timestamp > ago(1h)
| order by timestamp desc
| take 50

Best for: Real-time monitoring, startup issues, general web app logs

Azure CLI:

Terminal window
# 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 logs
az webapp log tail \
--name <your-app-name> \
--resource-group <your-resource-group>

Azure portal:

  1. Go to your App Service.
  2. 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.


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:

StatusDescription
PendingJob queued, waiting to be processed
DownloadingDownloading installer from WinGet repository
PackagingCreating .intunewin package
UploadingUploading package to Intune
CreatingCreating the Win32 app in Intune
CompletedSuccessfully published to Intune
FailedError occurred (see error message)

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:

  1. PackagingQueueService: processes packaging jobs
  2. WingetCacheStreamingService: refreshes the App Catalog daily
  3. RequestEscalationService: escalates stale approval requests
  4. IntuneSyncService: syncs apps from Intune every hour, with a full sync every night at 02:00 UTC
  5. InstallStatusPollingService: checks Intune for the install status of delivered requests
  6. ApprovalReminderService: sends reminders for requests waiting for approval
  7. RingProgressionService: moves update deployments through their rings

How to view:

Use Application Insights. Each service’s logs carry its name in CategoryName:

// Packaging service
traces
| where tostring(customDimensions.CategoryName) endswith "PackagingQueueService"
| order by timestamp desc
| take 100
// Cache refresh service
traces
| where tostring(customDimensions.CategoryName) endswith "WingetCacheStreamingService"
| order by timestamp desc
| take 100
// Request escalation service
traces
| where tostring(customDimensions.CategoryName) endswith "RequestEscalationService"
| order by timestamp desc
| take 100
// Intune sync service
traces
| where tostring(customDimensions.CategoryName) endswith "IntuneSyncService"
| order by timestamp desc
| take 100

Some problems happen on the device, not in App Store. These logs are on the device:

LogLocationWhat 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 userWhat the detection script found when Intune checked whether the app is installed
AppStore-Uninstall.logThe same folders as AppStore-Detection.logWhich app the uninstall script chose to remove, and the uninstaller’s exit code
<app name>_Install.log, <app name>_Uninstall.logC:\ProgramData\Microsoft\IntuneManagementExtension\LogsThe 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.

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:

Terminal window
# View all app settings
az webapp config appsettings list \
--name <your-app-name> \
--resource-group <your-resource-group> \
--query "[?name=='APPLICATIONINSIGHTS_CONNECTION_STRING']"

Azure portal:

  1. Go to your App Service.
  2. Select Settings > Environment variables.
  3. Look for APPLICATIONINSIGHTS_CONNECTION_STRING.
  4. 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:

  1. Visit your portal homepage
  2. Go to a few pages
  3. Wait 2-3 minutes for logs to appear

C. Query for recent activity:

requests
| where timestamp > ago(10m)
| order by timestamp desc
| take 20

If 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:

Terminal window
# Get the connection string from Application Insights
az monitor app-insights component show \
--app <insights-name> \
--resource-group <resource-group> \
--query "connectionString" -o tsv
# Set it in App Service
az webapp config appsettings set \
--name <app-name> \
--resource-group <resource-group> \
--settings APPLICATIONINSIGHTS_CONNECTION_STRING="<connection-string>"
# Restart the app
az webapp restart \
--name <app-name> \
--resource-group <resource-group>