Skip to content

Commit bf0a6f1

Browse files
authored
Merge pull request #189092 from barclayn/mi-clarity-02
Mi clarity 02
2 parents fd4877e + 3867200 commit bf0a6f1

File tree

2 files changed

+34
-32
lines changed

2 files changed

+34
-32
lines changed

articles/active-directory/managed-identities-azure-resources/tutorial-vm-windows-access-storage.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.subservice: msi
1313
ms.topic: tutorial
1414
ms.tgt_pltfrm: na
1515
ms.workload: identity
16-
ms.date: 01/11/2022
16+
ms.date: 02/18/2022
1717
ms.author: barclayn
1818
ms.collection: M365-identity-device-management
1919
---
@@ -51,12 +51,12 @@ This tutorial shows you how to use a system-assigned managed identity for a Wind
5151

5252
In this section, you create a storage account.
5353

54-
1. Click the **+ Create a resource** button found on the upper left-hand corner of the Azure portal.
55-
2. Click **Storage**, then **Storage account - blob, file, table, queue**.
54+
1. Select the **+ Create a resource** button found on the upper left-hand corner of the Azure portal.
55+
2. Select **Storage**, then **Storage account - blob, file, table, queue**.
5656
3. Under **Name**, enter a name for the storage account.
5757
4. **Deployment model** and **Account kind** should be set to **Resource manager** and **Storage (general purpose v1)**.
5858
5. Ensure the **Subscription** and **Resource Group** match the ones you specified when you created your VM in the previous step.
59-
6. Click **Create**.
59+
6. Select **Create**.
6060

6161
![Create new storage account](./media/msi-tutorial-linux-vm-access-storage/msi-storage-create.png)
6262

@@ -65,24 +65,24 @@ In this section, you create a storage account.
6565
Files require blob storage so you need to create a blob container in which to store the file. You then upload a file to the blob container in the new storage account.
6666

6767
1. Navigate back to your newly created storage account.
68-
2. Under **Blob Service**, click **Containers**.
69-
3. Click **+ Container** on the top of the page.
70-
4. Under **New container**, enter a name for the container and under **Public access level** keep the default value .
68+
2. Under **Blob Service**, select **Containers**.
69+
3. Select **+ Container** on the top of the page.
70+
4. Under **New container**, enter a name for the container and under **Public access level** keep the default value.
7171

7272
![Create storage container](./media/msi-tutorial-linux-vm-access-storage/create-blob-container.png)
7373

7474
5. Using an editor of your choice, create a file titled *hello world.txt* on your local machine. Open the file and add the text (without the quotes) "Hello world! :)" and then save it.
7575
6. Upload the file to the newly created container by clicking on the container name, then **Upload**
76-
7. In the **Upload blob** pane, under **Files**, click the folder icon and browse to the file **hello_world.txt** on your local machine, select the file, then click **Upload**.
76+
7. In the **Upload blob** pane, under **Files**, select the folder icon and browse to the file **hello_world.txt** on your local machine, select the file, then select **Upload**.
7777
![Upload text file](./media/msi-tutorial-linux-vm-access-storage/upload-text-file.png)
7878

7979
### Grant access
8080

8181
This section shows how to grant your VM access to an Azure Storage container. You can use the VM's system-assigned managed identity to retrieve the data in the Azure storage blob.
8282

8383
1. Navigate back to your newly created storage account.
84-
1. Click **Access control (IAM)**.
85-
1. Click **Add** > **Add role assignment** to open the Add role assignment page.
84+
1. Select **Access control (IAM)**.
85+
1. Select **Add** > **Add role assignment** to open the Add role assignment page.
8686
1. Assign the following role. For detailed steps, see [Assign Azure roles using the Azure portal](../../role-based-access-control/role-assignments-portal.md).
8787

8888
| Setting | Value |
@@ -96,9 +96,9 @@ This section shows how to grant your VM access to an Azure Storage container. Yo
9696

9797
## Access data 
9898

99-
Azure Storage natively supports Azure AD authentication, so it can directly accept access tokens obtained using a managed identity. This is part of Azure Storage's integration with Azure AD, and is different from supplying credentials on the connection string.
99+
Azure Storage natively supports Azure AD authentication, so it can directly accept access tokens obtained using a managed identity. This approach uses Azure Storage's integration with Azure AD, and is different from supplying credentials on the connection string.
100100

101-
Here's a .NET code example of opening a connection to Azure Storage using an access token and then reading the contents of the file you created earlier. This code must run on the VM to be able to access the VM's managed identity endpoint. .NET Framework 4.6 or higher is required to use the access token method. Replace the value of `<URI to blob file>` accordingly. You can obtain this value by navigating to file you created and uploaded to blob storage and copying the **URL** under **Properties** the **Overview** page.
101+
Here's a .NET code example of opening a connection to Azure Storage. The example uses an access token and then reads the contents of the file you created earlier. This code must run on the VM to be able to access the VM's managed identity endpoint. .NET Framework 4.6 or higher is required to use the access token method. Replace the value of `<URI to blob file>` accordingly. You can obtain this value by navigating to file you created and uploaded to blob storage and copying the **URL** under **Properties** the **Overview** page.
102102

103103
```csharp
104104
using System;
@@ -181,7 +181,7 @@ The response contains the contents of the file:
181181

182182
## Next steps
183183

184-
In this tutorial, you learned how enable a Windows VM's system-assigned identity to access Azure Storage. To learn more about Azure Storage see:
184+
In this tutorial, you learned how enable a Windows VM's system-assigned identity to access Azure Storage. To learn more about Azure Storage, see:
185185

186186
> [!div class="nextstepaction"]
187187
> [Azure Storage](../../storage/common/storage-introduction.md)

articles/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-datalake.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.subservice: msi
1212
ms.topic: tutorial
1313
ms.tgt_pltfrm: na
1414
ms.workload: identity
15-
ms.date: 01/11/2022
15+
ms.date: 02/18/2022
1616
ms.author: barclayn
1717
ms.collection: M365-identity-device-management
1818
---
@@ -21,7 +21,9 @@ ms.collection: M365-identity-device-management
2121

2222
[!INCLUDE [preview-notice](../../../includes/active-directory-msi-preview-notice.md)]
2323

24-
This tutorial shows you how to use a system-assigned managed identity for a Windows virtual machine (VM) to access an Azure Data Lake Store. Managed Service Identities are automatically managed by Azure and enable you to authenticate to services that support Azure AD authentication, without needing to insert credentials into your code. You learn how to:
24+
This tutorial shows you how to use a system-assigned managed identity for a Windows virtual machine (VM) to access an Azure Data Lake Store. Managed identities are automatically managed by Azure. They enable your application to authenticate to services that support Azure AD authentication, without needing to insert credentials into your code.
25+
26+
In this article you learn how to:
2527

2628
> [!div class="checklist"]
2729
> * Grant your VM access to an Azure Data Lake Store
@@ -48,34 +50,34 @@ This tutorial shows you how to use a system-assigned managed identity for a Wind
4850

4951
Now you can grant your VM access to files and folders in an Azure Data Lake Store. For this step, you can use an existing Data Lake Store or create a new one. To create a new Data Lake Store using the Azure portal, follow this [Azure Data Lake Store quickstart](../../data-lake-store/data-lake-store-get-started-portal.md). There are also quickstarts that use the Azure CLI and Azure PowerShell in the [Azure Data Lake Store documentation](../../data-lake-store/data-lake-store-overview.md).
5052

51-
In your Data Lake Store, create a new folder and grant your VM's system-assigned identity permission to read, write, and execute files in that folder:
53+
In your Data Lake Store, create a new folder and grant your VM's system-assigned identity permission. The identity needs rights to read, write, and execute files in that folder:
5254

53-
1. In the Azure portal, click **Data Lake Store** in the left-hand navigation.
54-
2. Click the Data Lake Store you want to use for this tutorial.
55-
3. Click **Data Explorer** in the command bar.
56-
4. The root folder of the Data Lake Store is selected. Click **Access** in the command bar.
57-
5. Click **Add**. In the **Select** field, enter the name of your VM, for example **DevTestVM**. Click to select your VM from the search results, then click **Select**.
58-
6. Click **Select Permissions**. Select **Read** and **Execute**, add to **This folder**, and add as **An access permission only**. Click **Ok**. The permission should be added successfully.
55+
1. In the Azure portal, select **Data Lake Store** in the left-hand navigation.
56+
2. Select the Data Lake Store you want to use for this tutorial.
57+
3. Select **Data Explorer** in the command bar.
58+
4. The root folder of the Data Lake Store is selected. Select **Access** in the command bar.
59+
5. Select **Add**. In the **Select** field, enter the name of your VM, for example **DevTestVM**. Select to select your VM from the search results, then select **Select**.
60+
6. Select **Select Permissions**. Select **Read** and **Execute**, add to **This folder**, and add as **An access permission only**. Select **Ok**. The permission should be added successfully.
5961
7. Close the **Access** blade.
60-
8. For this tutorial, create a new folder. Click **New Folder** in the command bar, and give the new folder a name, for example **TestFolder**. Click **Ok**.
61-
9. Click on the folder you created, then click **Access** in the command bar.
62-
10. Similar to step 5, click **Add**, in the **Select** field enter the name of your VM, select it and click **Select**.
63-
11. Similar to step 6, click **Select Permissions**, select **Read**, **Write**, and **Execute**, add to **This folder**, and add as **An access permission entry and a default permission entry**. Click **Ok**. The permission should be added successfully.
62+
8. For this tutorial, create a new folder. Select **New Folder** in the command bar, and give the new folder a name, for example **TestFolder**. Select **Ok**.
63+
9. Select on the folder you created, then select **Access** in the command bar.
64+
10. Similar to step 5, select **Add**, in the **Select** field enter the name of your VM, select it and select **Select**.
65+
11. Similar to step 6, select **Select Permissions**, select **Read**, **Write**, and **Execute**, add to **This folder**, and add as **An access permission entry and a default permission entry**. Select **Ok**. The permission should be added successfully.
6466

6567
Your VM's system-assigned managed identity can now perform all operations on files in the folder you created. For more information on managing access to Data Lake Store, read this article on [Access Control in Data Lake Store](../../data-lake-store/data-lake-store-access-control.md).
6668

6769
## Access data
6870

69-
Azure Data Lake Store natively supports Azure AD authentication, so it can directly accept access tokens obtained using managed identities for Azure resources. To authenticate to the Data Lake Store filesystem you send an access token issued by Azure AD to your Data Lake Store filesystem endpoint, in an Authorization header in the format "Bearer <ACCESS_TOKEN_VALUE>". To learn more about Data Lake Store support for Azure AD authentication, read [Authentication with Data Lake Store using Azure Active Directory](../../data-lake-store/data-lakes-store-authentication-using-azure-active-directory.md)
71+
Azure Data Lake Store natively supports Azure AD authentication, so it can directly accept access tokens obtained using managed identities for Azure resources. To authenticate to the Data Lake Store filesystem, you send an access token issued by Azure AD to your Data Lake Store filesystem endpoint in an Authorization header. The header has the format "Bearer <ACCESS_TOKEN_VALUE>". To learn more about Data Lake Store support for Azure AD authentication, read [Authentication with Data Lake Store using Azure Active Directory](../../data-lake-store/data-lakes-store-authentication-using-azure-active-directory.md)
7072

7173
> [!NOTE]
7274
> The Data Lake Store filesystem client SDKs do not yet support managed identities for Azure resources. This tutorial will be updated when support is added to the SDK.
7375
7476
In this tutorial, you authenticate to the Data Lake Store filesystem REST API using PowerShell to make REST requests. To use the VM's system-assigned managed identity for authentication, you need to make the requests from the VM.
7577

76-
1. In the portal, navigate to **Virtual Machines**, go to your Windows VM, and in the **Overview** click **Connect**.
78+
1. In the portal, navigate to **Virtual Machines**, go to your Windows VM, and in the **Overview** select **Connect**.
7779
2. Enter in your **Username** and **Password** for which you added when you created the Windows VM.
78-
3. Now that you have created a **Remote Desktop Connection** with the virtual machine, open **PowerShell** in the remote session.
80+
3. Now that you've created a **Remote Desktop Connection** with the virtual machine, open **PowerShell** in the remote session.
7981
4. Using PowerShell’s `Invoke-WebRequest`, make a request to the local managed identities for Azure resources endpoint to get an access token for Azure Data Lake Store. The resource identifier for Data Lake Store is `https://datalake.azure.net/`. Data Lake does an exact match on the resource identifier and the trailing slash is important.
8082

8183
```powershell
@@ -94,7 +96,7 @@ In this tutorial, you authenticate to the Data Lake Store filesystem REST API us
9496
$AccessToken = $content.access_token
9597
```
9698

97-
5. Using PowerShell's `Invoke-WebRequest', make a request to your Data Lake Store's REST endpoint to list the folders in the root folder. This is a simple way to check everything is configured correctly. It is important the string "Bearer" in the Authorization header has a capital "B". You can find the name of your Data Lake Store in the **Overview** section of the Data Lake Store blade in the Azure portal.
99+
5. Check that everything is configured correctly. Using PowerShell's `Invoke-WebRequest', make a request to your Data Lake Store's REST endpoint to list the folders in the root folder. It's important the string "Bearer" in the Authorization header has a capital "B". You can find the name of your Data Lake Store in the **Overview** section of your Data Lake Store.
98100

99101
```powershell
100102
Invoke-WebRequest -Uri https://<YOUR_ADLS_NAME>.azuredatalakestore.net/webhdfs/v1/?op=LISTSTATUS -Headers @{Authorization="Bearer $AccessToken"}
@@ -135,7 +137,7 @@ In this tutorial, you authenticate to the Data Lake Store filesystem REST API us
135137
$HdfsRedirectResponse = Invoke-WebRequest -Uri https://<YOUR_ADLS_NAME>.azuredatalakestore.net/webhdfs/v1/TestFolder/Test1.txt?op=CREATE -Method PUT -Headers @{Authorization="Bearer $AccessToken"} -Infile Test1.txt -MaximumRedirection 0
136138
```
137139

138-
If you inspect the value of `$HdfsRedirectResponse` it should look like the following response:
140+
If you inspect the value of `$HdfsRedirectResponse`, it should look like the following response:
139141

140142
```powershell
141143
PS C:\> $HdfsRedirectResponse
@@ -190,7 +192,7 @@ Using other Data Lake Store filesystem APIs you can append to files, download fi
190192

191193
## Next steps
192194

193-
In this tutorial, you learned how to use a system-assigned managed identity for a Windows virtual machine to access an Azure Data Lake Store. To learn more about Azure Data Lake Store see:
195+
In this tutorial, you learned how to use a system-assigned managed identity for a Windows virtual machine to access an Azure Data Lake Store. To learn more about Azure Data Lake Store, see:
194196

195197
> [!div class="nextstepaction"]
196198
>[Azure Data Lake Store](../../data-lake-store/data-lake-store-overview.md)

0 commit comments

Comments
 (0)