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
To complete this tutorial, you need the following:
22
+
## Prerequisites
23
23
24
24
* Visual Studio.
25
25
26
-
* An active Azure account. If you don't have an account, you can create a [free account](https://azure.microsoft.com/pricing/free-trial/) in just a couple of minutes.
27
-
28
-
*[Azure PowerShell 1.0](/powershell/azure/install-Az-ps) or later.
26
+
*[Azure Az PowerShell module](/powershell/azure/install-Az-ps).
@@ -39,7 +37,7 @@ To complete this tutorial, you need the following:
39
37
40
38
4. In NuGet Package Manager, search for **Microsoft.IdentityModel.Clients.ActiveDirectory**. Click **Install**, in **Review Changes** click **OK**, then click **I Accept** to accept the license.
41
39
> [!IMPORTANT]
42
-
> The [Microsoft.IdentityModel.Clients.ActiveDirectory](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory) NuGet package and Azure AD Authentication Library (ADAL) have been deprecated. No new features have been added since June 30, 2020. We strongly encourage you to upgrade, see the [migration guide](../active-directory/develop/msal-migration.md) for more details.
40
+
> The [Microsoft.IdentityModel.Clients.ActiveDirectory](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory) NuGet package and Azure AD Authentication Library (ADAL) have been deprecated. No new features have been added since June 30, 2020. We strongly encourage you to upgrade. For more information see the [migration guide](../active-directory/develop/msal-migration.md).
43
41
44
42
5. In Program.cs, replace the existing **using** statements with the following code:
45
43
@@ -170,7 +168,7 @@ You can now complete the application by calling the **CreateIoTHub** method befo
Copy file name to clipboardExpand all lines: includes/iot-hub-prepare-resource-manager.md
+25-19Lines changed: 25 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ ms.topic: include
6
6
ms.date: 10/26/2018
7
7
---
8
8
## Prepare to authenticate Azure Resource Manager requests
9
-
You must authenticate all the operations that you perform on resources using the [Azure Resource Manager][lnk-authenticate-arm] with Azure Active Directory (AD). The easiest way to configure this is to use PowerShell or Azure CLI.
9
+
You must authenticate all the operations that you perform on resources using the [Azure Resource Manager][lnk-authenticate-arm] with Azure Active Directory (AD). The easiest way to configure Azure AD is to use PowerShell or Azure CLI.
10
10
11
11
Install the [Azure PowerShell cmdlets][lnk-powershell-install] before you continue.
12
12
@@ -18,44 +18,50 @@ The following steps show how to set up password authentication for an AD applica
18
18
Connect-AzAccount
19
19
```
20
20
21
-
1. If you have multiple Azure subscriptions, signing in to Azure grants you access to all the Azure subscriptions associated with your credentials. Use the following command to list the Azure subscriptions available for you to use:
21
+
1. If you have multiple Azure subscriptions, signing in to Azure grants you access to all the Azure subscriptions associated with your credentials.
22
22
23
-
```powershell
24
-
Get-AzSubscription
25
-
```
23
+
List the Azure subscriptions available for you to use:
26
24
27
-
Use the following command to select subscription that you want to use to run the commands to manage your IoT hub. You can use either the subscription name or ID from the output of the previous command:
25
+
```powershell
26
+
Get-AzSubscription
27
+
```
28
28
29
-
```powershell
30
-
Select-AzSubscription `
31
-
-SubscriptionName "{your subscription name}"
32
-
```
29
+
Select the subscription you want to use. You can use either the subscription name or ID from the output of the previous command.
2. Make a note of your **TenantId** and **SubscriptionId**. You need them later.
35
-
3. Create a new Azure Active Directory application using the following command, replacing the place holders:
35
+
1. Save your **TenantId** and **SubscriptionId** for later.
36
+
37
+
1. Create a new Azure Active Directory application using the following command, replacing the placeholders:
36
38
37
39
***{Display name}:** a display name for your application such as **MySampleApp**
38
-
* **{Home page URL}:** the URL of the home page of your app such as **http:\//mysampleapp/home**. This URL does not need to point to a real application.
39
-
* **{Application identifier}:** A unique identifier such as **http:\//mysampleapp**. This URL does not need to point to a real application.
40
+
***{Home page URL}:** the URL of the home page of your app such as **http:\//mysampleapp/home**. This URL doesn't need to point to a real application.
41
+
***{Application identifier}:** A unique identifier such as **http:\//mysampleapp**. This URL doesn't need to point to a real application.
40
42
***{Password}:** A password that you use to authenticate with your app.
You have now finished creating the Azure AD application that enables you to authenticate from your custom C# application. You need the following values later in this tutorial:
62
+
With your new Azure AD application, you can now authenticate from your custom C# application.
63
+
64
+
You need the following values later in this tutorial:
0 commit comments