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
Copy file name to clipboardExpand all lines: articles/governance/resource-graph/first-query-dotnet.md
+39-61Lines changed: 39 additions & 61 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,92 +1,71 @@
1
1
---
2
-
title: "Quickstart: Your first .NET Core query"
3
-
description: In this quickstart, you follow the steps to enable the Resource Graph NuGet packages for .NET Core and run your first query.
4
-
ms.date: 01/19/2023
2
+
title: "Quickstart: Your first .NET query"
3
+
description: In this quickstart, you follow the steps to enable the Resource Graph NuGet packages for .NET and run your first query.
4
+
ms.date: 01/20/2023
5
5
ms.topic: quickstart
6
6
ms.custom: devx-track-csharp
7
7
ms.author: timwarner
8
8
---
9
-
# Quickstart: Run your first Resource Graph query using .NET Core
9
+
# Quickstart: Run your first Resource Graph query using .NET
10
10
11
11
> [!NOTE]
12
12
> Special thanks to [Glenn Block](https://github.com/glennblock) for contributing
13
13
> the code used in this quickstart.
14
14
15
-
The first step to using Azure Resource Graph is to check that the required packages for .NET Core
16
-
are installed. This quickstart walks you through the process of adding the packages to your .NET
17
-
Core installation.
15
+
The first step to using Azure Resource Graph is to check that the required NuGet packages are installed. This quickstart walks you through the process of adding the packages to your .NET application.
18
16
19
-
At the end of this process, you'll have added the packages to your .NET Core installation and run
20
-
your first Resource Graph query.
17
+
At the end of this process, you'll have added the packages to your .NET application and run your first Resource Graph query.
21
18
22
19
## Prerequisites
23
20
21
+
-[.NET SDK 6.0 or later](https://dotnet.microsoft.com/download/dotnet)
24
22
- An Azure subscription. If you don't have an Azure subscription, create a
25
-
[free](https://azure.microsoft.com/free/) account before you begin.
23
+
[free](https://azure.microsoft.com/free/dotnet/) account before you begin.
26
24
- An Azure service principal, including the _clientId_ and _clientSecret_. If you don't have a
27
25
service principal for use with Resource Graph or want to create a new one, see
28
26
[Azure management libraries for .NET authentication](/dotnet/azure/sdk/authentication#mgmt-auth).
29
-
Skip the step to install the .NET Core packages as we'll do that in the next steps.
27
+
Skip the step to install the NuGet packages, as we'll do that in the next steps.
30
28
31
29
## Create the Resource Graph project
32
30
33
-
To enable .NET Core to query Azure Resource Graph, create a new console application and install the
31
+
To enable .NET to query Azure Resource Graph, create a new console application and install the
34
32
required packages.
35
33
36
-
1. Check that the latest .NET Core is installed (at least **3.1.5**). If it isn't yet installed,
37
-
download it at [dotnet.microsoft.com](https://dotnet.microsoft.com/download/dotnet-core).
38
-
39
-
1. Initialize a new .NET Core console application named "argQuery":
34
+
1. Create a new .NET console application named "argQuery":
40
35
41
36
```dotnetcli
42
37
dotnet new console --name "argQuery"
43
38
```
44
39
45
-
1. Change directories into the new project folder and install the required packages for Azure Resource Graph:
40
+
1. Change directories into the new project folder. Install the packages for the Azure Resource Graph and Azure Identity client libraries:
0 commit comments