Troubleshoot Azure Monitor data source issues
This document provides solutions to common issues you may encounter when configuring or using the Azure Monitor data source.
Configuration and authentication errors
These errors typically occur when setting up the data source or when authentication credentials are invalid.
“Authorization failed” or “Access denied”
Symptoms:
- Save & test fails with “Authorization failed”
- Queries return “Access denied” errors
- Subscriptions don’t load when clicking Load Subscriptions
Possible causes and solutions:
“Invalid client secret” or “Client secret not found”
Symptoms:
- Authentication fails immediately after configuration
- Error message references invalid credentials
Solutions:
- Ensure you copied the client secret value, not the secret ID. In Azure Portal under Certificates & secrets, the secret value is only shown once when created. The secret ID is a different identifier and won’t work for authentication.
- Verify the client secret was copied correctly (no extra spaces or truncation).
- Check if the secret has expired in Azure Portal under App registrations > your app > Certificates & secrets.
- Create a new secret and update the data source configuration.
“Tenant not found” or “Invalid tenant ID”
Symptoms:
- Data source test fails with tenant-related errors
- Unable to authenticate
Solutions:
- Verify the Directory (tenant) ID in Azure Portal under Microsoft Entra ID > Overview.
- Ensure you’re using the correct Azure cloud setting (Azure, Azure Government, or Azure China).
- Check that the tenant ID is a valid GUID format.
Managed Identity not working
Symptoms:
- Managed Identity option is available but authentication fails
- Error: “Managed identity authentication is not available”
Solutions:
- Verify
managed_identity_enabled = trueis set in the Grafana server configuration under[azure]. - Confirm the Azure resource hosting Grafana has managed identity enabled.
- For user-assigned managed identity, ensure
managed_identity_client_idis set correctly. - Verify the managed identity has the
Readerrole on the target resources. - Restart Grafana after changing server configuration.
Workload Identity not working
Symptoms:
- Workload Identity authentication fails in Kubernetes/AKS environment
- Token file errors
Solutions:
- Verify
workload_identity_enabled = trueis set in the Grafana server configuration. - Check that the service account is correctly annotated for workload identity.
- Verify the federated credential is configured in Azure.
- Ensure the token path is accessible to the Grafana pod.
- Check the workload identity webhook is running in the cluster.
Query errors
These errors occur when executing queries against Azure Monitor services.
“No data” or empty results
Symptoms:
- Query executes without error but returns no data
- Charts show “No data” message
Possible causes and solutions:
“Bad request” or “Invalid query”
Symptoms:
- Query fails with 400 error
- Error message indicates query syntax issues
Solutions for Logs queries:
- Validate your KQL syntax in the Azure Portal Log Analytics query editor.
- Check for typos in table names or column names.
- Ensure referenced tables exist in the selected workspace.
- Verify the time range is valid (not in the future, not too far in the past for data retention).
Solutions for Metrics queries:
- Verify the metric name is valid for the selected resource type.
- Check that dimension filters use valid dimension names and values.
- Ensure the aggregation type is supported for the selected metric.
“Resource not found”
Symptoms:
- Query fails with 404 error
- Resource picker shows resources that can’t be queried
Solutions:
- Verify the resource still exists in Azure (it may have been deleted or moved).
- Check that the subscription is correct.
- Refresh the resource picker by re-selecting the subscription.
- Verify the identity has access to the resource’s resource group.
Logs query timeout
Symptoms:
- Query runs for a long time then fails
- Error mentions timeout or query limits
Solutions:
- Narrow the time range to reduce data volume.
- Add filters to reduce the result set.
- Use
summarizeto aggregate data instead of returning raw rows. - Consider using Basic Logs for large datasets (if enabled).
- Break complex queries into smaller parts.
“Metrics not available” for a resource
Symptoms:
- Resource appears in picker but no metrics are listed
- Metric dropdown is empty
Solutions:
- Verify the resource type supports Azure Monitor metrics.
- Check if the resource is in a region that supports metrics.
- Some resources require diagnostic settings to emit metrics—configure these in Azure Portal.
- Try selecting a different namespace for the resource.
Azure Resource Graph errors
These errors are specific to Azure Resource Graph (ARG) queries.
“Query execution failed”
Symptoms:
- ARG query fails with execution errors
- Results don’t match expected resources
Solutions:
- Validate query syntax in Azure Portal Resource Graph Explorer.
- Check that you have access to the subscriptions being queried.
- Verify table names are correct (e.g.,
Resources,ResourceContainers). - Some ARG features require specific permissions, check ARG documentation.
Query returns incomplete results
Symptoms:
- Not all expected resources appear in results
- Results seem truncated
Solutions:
- ARG queries are paginated. The data source handles pagination automatically, but very large result sets may be limited.
- Add filters to reduce result set size.
- Verify you have access to all subscriptions containing the resources.
Application Insights Traces errors
These errors are specific to the Traces query type.
“No traces found”
Symptoms:
- Trace query returns empty results
- Operation ID search finds nothing
Solutions:
- Verify the Application Insights resource is collecting trace data.
- Check that the time range includes when the traces were generated.
- Ensure the Operation ID is correct (copy directly from another trace or log).
- Verify the identity has access to the Application Insights resource.
Template variable errors
For detailed troubleshooting of template variables, refer to the template variables troubleshooting section.
Variables return no values
Solutions:
- Verify the data source connection is working (test it in the data source settings).
- Check that parent variables (for cascading variables) have valid selections.
- Verify the identity has permissions to list the requested resources.
- For Logs variables, ensure the KQL query returns a single column.
Variables are slow to load
Solutions:
- Set variable refresh to On dashboard load instead of On time range change.
- Reduce the scope of variable queries (e.g., filter by resource group instead of entire subscription).
- For Logs variables, optimize the KQL query to return results faster.
Connection and network errors
These errors indicate problems with network connectivity between Grafana and Azure services.
“Connection refused” or timeout errors
Symptoms:
- Data source test fails with network errors
- Queries timeout without returning results
Solutions:
- Verify network connectivity from Grafana to Azure endpoints.
- Check firewall rules allow outbound HTTPS (port 443) to Azure services.
- For private networks, ensure Private Link or VPN is configured correctly.
- For Grafana Cloud, configure Private Data Source Connect if accessing private resources.
SSL/TLS certificate errors
Symptoms:
- Certificate validation failures
- SSL handshake errors
Solutions:
- Ensure the system time is correct (certificate validation fails with incorrect time).
- Verify corporate proxy isn’t intercepting HTTPS traffic.
- Check that required CA certificates are installed on the Grafana server.
Get additional help
If you’ve tried the solutions above and still encounter issues:
- Check the Grafana community forums for similar issues.
- Review the Azure Monitor data source GitHub issues for known bugs.
- Enable debug logging in Grafana to capture detailed error information.
- Contact Grafana Support if you’re an Enterprise, Cloud Pro or Cloud Contracted user.
- When reporting issues, include:
- Grafana version
- Error messages (redact sensitive information)
- Steps to reproduce
- Relevant configuration (redact credentials)



