You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Run queries with the Azure Resource Graph Power BI connector
2
+
title: Run queries with Azure Resource Graph Power BI connector
3
3
description: In this quickstart, you learn how to run queries with the Azure Resource Graph Power BI connector.
4
-
ms.date: 01/29/2024
4
+
ms.date: 02/22/2024
5
5
ms.topic: quickstart
6
6
---
7
7
8
8
# Quickstart: Run queries with the Azure Resource Graph Power BI connector
9
9
10
-
In this quickstart, you learn how to run queries with the Azure Resource Graph Power BI connector. By default the Power BI connector runs queries at the tenant level but you can change the scope to subscription or management group. Resource Graph by default returns a maximum of 1,000 records but the Power BI connector has an optional setting to return all records if your query results have more than 1,000 records.
10
+
In this quickstart, you learn how to run queries with the Azure Resource Graph Power BI connector. By default the Power BI connector runs queries at the tenant level but you can change the scope to subscription or management group. Azure Resource Graph by default returns a maximum of 1,000 records but the Power BI connector has an optional setting to return all records if your query results have more than 1,000 records.
11
11
12
12
> [!NOTE]
13
13
> The Azure Resource Graph Power BI connector is in public preview.
@@ -18,21 +18,28 @@ In this quickstart, you learn how to run queries with the Azure Resource Graph P
18
18
## Prerequisites
19
19
20
20
- If you don't have an Azure account with an active subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
21
-
-[Power BI Desktop](https://powerbi.microsoft.com/desktop/).
22
-
- Azure role-based access control rights with at least _Reader_ role assignment to resources. Learn more about [how to assign roles](../../role-based-access-control/role-assignments-portal.md).
21
+
-[Power BI Desktop](https://powerbi.microsoft.com/desktop/) or a [Power BI service](https://app.powerbi.com/) workspace in your organization's tenant.
22
+
- Azure role-based access control rights with at least _Reader_ role assignment to resources. To learn more about role assignments, go to [Assign Azure roles using the Azure portal](../../role-based-access-control/role-assignments-portal.md).
23
23
24
-
## Connect Resource Graph with Power BI connector
24
+
## Connect Azure Resource Graph with Power BI connector
25
25
26
-
After Power BI Desktop is installed, you can connect Resource Graph with Power BI connector so that you can run a query. If you don't have a query to run, you can use the following sample that queries for storage accounts.
26
+
You can run queries with Power BI Desktop or Power BI service. Don't use comments when you enter a query.
27
+
28
+
If you don't have a query, you can use the following sample that queries for storage accounts:
27
29
28
30
```kusto
29
31
resources
30
32
| where type == 'microsoft.storage/storageaccounts'
31
33
```
32
34
35
+
# [Power BI Desktop](#tab/power-bi-desktop)
36
+
37
+
After Power BI Desktop is installed, you can connect Azure Resource Graph with Power BI connector so that you can run a query.
38
+
33
39
The following example runs a query with the default settings.
34
40
35
41
1. Open the Power BI Desktop app on your computer and close any dialog boxes that are displayed.
1. Go to **Home** > **Get data** > **More** > **Azure** > **Azure Resource Graph** and select **Connect**.
37
44
38
45
:::image type="content" source="./media/power-bi-connector-quickstart/power-bi-get-data.png" alt-text="Screenshot of the get data dialog box in Power BI Desktop to select the Azure Resource Graph connector.":::
@@ -41,13 +48,35 @@ The following example runs a query with the default settings.
41
48
42
49
:::image type="content" source="./media/power-bi-connector-quickstart/query-dialog-box.png" alt-text="Screenshot of the Azure Resource Graph dialog box to enter a query and use the default settings.":::
43
50
44
-
1. Select **OK** to run the query and if prompted, enter your credentials.
45
-
1. Select **Connect** to run the query. The results are displayed in Power BI Desktop.
51
+
1. Select **OK**. If prompted, enter your credentials and select **Connect** to run the query.
46
52
1. Select **Load** or **Transform Data**.
47
53
48
54
-**Load** imports the query results into Power BI Desktop.
49
55
-**Transform Data** opens the Power Query Editor with your query results.
50
56
57
+
# [Power BI service](#tab/power-bi-service)
58
+
59
+
You need a workspace with _Dataflow_ so you can connect Azure Resource Graph with Power BI connector and run a query.
60
+
61
+
1. Go to your organization's [Power BI service](https://app.powerbi.com/).
62
+
1. Open a workspace and select **New** > **Dataflow**.
63
+
1. Select **Add new tables** from **Define new tables**.
64
+
1. In **Choose data source** type _azure resource graph_ to search for the connector.
65
+
66
+
:::image type="content" source="./media/power-bi-connector-quickstart/power-bi-service-get-data.png" alt-text="Screenshot of the get data dialog box in Power BI service to select the Azure Resource Graph connector.":::
67
+
68
+
1. Select **Azure Resource Graph**.
69
+
1. Enter a query into the **Query** box. You can copy and paste the query.
70
+
71
+
:::image type="content" source="./media/power-bi-connector-quickstart/power-bi-service-query-dialog-box.png" alt-text="Screenshot of the Power BI service Azure Resource Graph dialog box to enter a query and use the default settings.":::
72
+
73
+
1. Select **Sign in** to authenticate with your Organizational account.
74
+
1. Select **Next** to run the query.
75
+
76
+
The results are displayed in Power Query. You can select to save or cancel.
77
+
78
+
---
79
+
51
80
## Use optional settings
52
81
53
82
You can select optional values to change the Azure subscription or management group that the query runs against or to get query results of more than 1,000 records.
@@ -57,24 +86,33 @@ You can select optional values to change the Azure subscription or management gr
57
86
| Scope | You can select subscription or management group. Tenant is the default scope when no selection is made. |
58
87
| Subscription ID | Required if you select subscription scope. Specify the Azure subscription ID. Use a comma-separated list to query multiple subscriptions. |
59
88
| Management group ID | Required if you select management group scope. Specify the Azure management group ID. Use a comma-separated list to query multiple management groups. |
60
-
| Advanced options | To get more than 1,000 records change `$resultTruncated` to `FALSE`. By default Resource Graph returns a maximum of 1,000 records. |
89
+
| Advanced options | To get more than 1,000 records change `$resultTruncated` to `FALSE`. By default Azure Resource Graph returns a maximum of 1,000 records. |
61
90
62
91
For example, to run a query for a subscription that returns more than 1,000 records:
63
92
64
93
- Set the scope to subscription.
65
94
- Enter a subscription ID.
66
95
- Set `$resultTruncated` to `FALSE`.
67
96
68
-
:::image type="content" source="./media/power-bi-connector-quickstart/query-dialog-box-options.png" alt-text="Screenshot of the Azure Resource Graph dialog box to enter a query and use optional settings for scope, subscription ID, and $resultTruncated.":::
97
+
# [Power BI Desktop](#tab/power-bi-desktop)
98
+
99
+
:::image type="content" source="./media/power-bi-connector-quickstart/query-dialog-box-options.png" alt-text="Screenshot of the Power BI Desktop Azure Resource Graph dialog box for a query using optional settings for scope, subscription ID, and $resultTruncated.":::
100
+
101
+
# [Power BI service](#tab/power-bi-service)
102
+
103
+
:::image type="content" source="./media/power-bi-connector-quickstart/power-bi-service-dialog-box-options.png" alt-text="Screenshot of the Power BI service Azure Resource Graph dialog box for a query using optional settings for scope, subscription ID, and $resultTruncated.":::
104
+
105
+
---
69
106
70
107
## Clean up resources
71
108
72
109
When you're finished, close any Power BI Desktop or Power Query windows and save or discard your queries.
73
110
74
-
## Related content
111
+
## Next steps
75
112
76
113
For more information about the query language or how to explore resources, go to the following articles.
77
114
115
+
-[Power BI connector troubleshooting guide](./troubleshoot/power-bi-connector.md).
78
116
-[Understanding the Azure Resource Graph query language](./concepts/query-language.md).
79
117
-[Explore your Azure resources with Resource Graph](./concepts/explore-resources.md).
80
118
- Sample queries listed by [table](./samples/samples-by-table.md) or [category](./samples/samples-by-category.md).
title: Troubleshoot Azure Resource Graph Power BI connector
3
+
description: Learn how to troubleshoot issues with Azure Resource Graph Power BI connector.
4
+
ms.date: 02/22/2024
5
+
ms.topic: troubleshooting
6
+
---
7
+
8
+
# Troubleshoot Azure Resource Graph Power BI connector
9
+
10
+
> [!NOTE]
11
+
> The Azure Resource Graph Power BI connector is in public preview.
12
+
13
+
The following descriptions help you troubleshoot Azure Resource Graph (ARG) data connector in Power BI.
14
+
15
+
## Connector availability
16
+
17
+
The ARG Power BI connector isn't available in all Power BI products and versions.
18
+
19
+
| Version | Products |
20
+
| ---- | ---- |
21
+
| 2.123.x <br> (November 2023) or later | Power BI Datasets (Desktop + Service) <br> Power BI (Dataflows) <br> Fabric (Dataflow Gen2) |
22
+
23
+
24
+
ARG Power BI connector isn't available in the following products:
25
+
26
+
- Excel
27
+
- Power Apps (Dataflows)
28
+
- Dynamic 365 Customer Insights
29
+
- Analysis Services
30
+
31
+
## Supported capabilities
32
+
33
+
The ARG Power BI connector only supports [import connections](/power-bi/connect-data/desktop-directquery-about#import-connections). The ARG Power BI connector doesn't support `DirectQuery` connections. For more information about connectivity modes and their differences, go to [DirectQuery in Power BI](/power-bi/connect-data/desktop-directquery-about).
34
+
35
+
## Load times and throttling
36
+
37
+
The load time for ARG queries in Power BI is contingent on the query size. Larger query results might lead to extended load times.
38
+
39
+
If you're experiencing a 429 error, which is due to throttling, go to [Guidance for throttled requests in Azure Resource Graph](../concepts/guidance-for-throttled-requests.md).
40
+
41
+
## Unexpected Results
42
+
43
+
If your query yields unexpected or inaccurate results, consider the following scenarios:
44
+
45
+
-**Verify permissions**: Confirm that your [Azure role-based access control (Azure RBAC) permissions](../../../role-based-access-control/overview.md) are accurate. Ensure you have at least read access to the resources you want to query. Queries don't return results without adequate permissions to the Azure object or object group.
46
+
-**Check for comments**: Review your query and remove any comments (`//`) because Power BI doesn't support Kusto comments. Comments might affect your query results.
47
+
-**Compare results**: For parity checks, run your query in both the ARG Explorer in Azure portal and the ARG Power BI connector. Compare the results obtained from both platforms for consistency.
48
+
49
+
## Errors
50
+
51
+
The ARG connector's query capability behaves the same at [ARG Explorer](../first-query-portal.md) in the Azure portal. For information about ARG common errors, go to the [troubleshooting guide](general.md#general-errors).
52
+
53
+
For Power BI errors, go to [common issues](/power-query/common-issues).
54
+
55
+
The following table contains descriptions of common ARG Power BI connector errors.
56
+
57
+
| Error | Description |
58
+
| ---- | ---- |
59
+
| Invalid query | Query that was entered isn't valid. Check the syntax of your query and refer to the ARG [Kusto Query Language (KQL)](../concepts/query-language.md#supported-kql-language-elements) for guidance. |
60
+
| Scope check | If you're querying at the tenant scope, delete all inputs in the subscription ID or management group ID fields. <br> <br> If you have inputs in the subscriptions ID or management group ID fields that you want to filter for, select either subscription or management group from the drop-down scope field. |
61
+
| Scope subscription mismatch | The subscription scope was selected from the scope drop-down field but a management group ID was entered. |
62
+
| Scope management group mismatch | The management group scope was selected from the scope drop-down field but a subscription ID was entered. |
0 commit comments