Skip to content

Commit 8506f38

Browse files
authored
Merge pull request #100749 from MarkusVi/arturo20207
arturo20207
2 parents 1065cd4 + 0fb9c05 commit 8506f38

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

articles/active-directory/managed-identities-azure-resources/tutorial-windows-vm-ua-arm.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.devlang: na
1212
ms.topic: tutorial
1313
ms.tgt_pltfrm: na
1414
ms.workload: identity
15-
ms.date: 04/10/2018
15+
ms.date: 01/10/2020
1616
ms.author: markvi
1717
ms.collection: M365-identity-device-management
1818
---
@@ -49,9 +49,9 @@ You learn how to:
4949
- Run `Install-Module -Name PowerShellGet -AllowPrerelease` to get the pre-release version of the `PowerShellGet` module (you may need to `Exit` out of the current PowerShell session after you run this command to install the `Az.ManagedServiceIdentity` module).
5050
- Run `Install-Module -Name Az.ManagedServiceIdentity -AllowPrerelease` to install the prerelease version of the `Az.ManagedServiceIdentity` module to perform the user-assigned identity operations in this article.
5151

52-
## Create a user-assigned identity
52+
## Create identity
5353

54-
A user-assigned identity is created as a standalone Azure resource. Using the [New-AzUserAssignedIdentity](/powershell/module/az.managedserviceidentity/get-azuserassignedidentity), Azure creates an identity in your Azure AD tenant that can be assigned to one or more Azure service instances.
54+
This section shows how to create a user-assigned identity. A user-assigned identity is created as a standalone Azure resource. Using the [New-AzUserAssignedIdentity](/powershell/module/az.managedserviceidentity/get-azuserassignedidentity), Azure creates an identity in your Azure AD tenant that can be assigned to one or more Azure service instances.
5555

5656
[!INCLUDE [ua-character-limit](~/includes/managed-identity-ua-character-limits.md)]
5757

@@ -75,18 +75,18 @@ Type: Microsoft.ManagedIdentity/userAssignedIdentities
7575
}
7676
```
7777

78-
## Assign the user-assigned identity to a Windows VM
78+
## Assign identity
7979

80-
A user-assigned identity can be used by clients on multiple Azure resources. Use the following commands to assign the user-assigned identity to a single VM. Use the `Id` property returned in the previous step for the `-IdentityID` parameter.
80+
This section shows how to Assign the user-assigned identity to a Windows VM. A user-assigned identity can be used by clients on multiple Azure resources. Use the following commands to assign the user-assigned identity to a single VM. Use the `Id` property returned in the previous step for the `-IdentityID` parameter.
8181

8282
```azurepowershell-interactive
8383
$vm = Get-AzVM -ResourceGroupName myResourceGroup -Name myVM
8484
Update-AzVM -ResourceGroupName TestRG -VM $vm -IdentityType "UserAssigned" -IdentityID "/subscriptions/<SUBSCRIPTIONID>/resourcegroups/myResourceGroupVM/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID1"
8585
```
8686

87-
## Grant your user-assigned identity access to a Resource Group in Azure Resource Manager
87+
## Grant access
8888

89-
Managed identities for Azure resources provides identities that your code can use to request access tokens to authenticate to resource APIs that support Azure AD authentication. In this tutorial, your code will access the Azure Resource Manager API.
89+
This section shows how to grant your user-assigned identity access to a Resource Group in Azure Resource Manager. Managed identities for Azure resources provides identities that your code can use to request access tokens to authenticate to resource APIs that support Azure AD authentication. In this tutorial, your code will access the Azure Resource Manager API.
9090

9191
Before your code can access the API, you need to grant the identity access to a resource in Azure Resource Manager. In this case, the Resource Group in which the VM is contained. Update the value for `<SUBSCRIPTION ID>` as appropriate for your environment.
9292

@@ -109,7 +109,7 @@ ObjectType: ServicePrincipal
109109
CanDelegate: False
110110
```
111111

112-
## Get an access token using the VM's identity and use it to call Resource Manager
112+
## Get an access token
113113

114114
For the remainder of the tutorial, you will work from the VM we created earlier.
115115

@@ -121,15 +121,15 @@ For the remainder of the tutorial, you will work from the VM we created earlier.
121121

122122
4. Now that you have created a **Remote Desktop Connection** with the virtual machine, open **PowerShell** in the remote session.
123123

124-
5. Using PowerShell’s `Invoke-WebRequest`, make a request to the local managed identities for Azure resources endpoint to get an access token for Azure Resource Manager. The `client_id` value is the value returned when you [created the user-assigned managed identity](#create-a-user-assigned-identity).
124+
5. Using PowerShell’s `Invoke-WebRequest`, make a request to the local managed identities for Azure resources endpoint to get an access token for Azure Resource Manager. The `client_id` value is the value returned when you created the user-assigned managed identity.
125125

126126
```azurepowershell
127127
$response = Invoke-WebRequest -Uri 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&client_id=af825a31-b0e0-471f-baea-96de555632f9&resource=https://management.azure.com/' -Method GET -Headers @{Metadata="true"}
128128
$content = $response.Content | ConvertFrom-Json
129129
$ArmToken = $content.access_token
130130
```
131131
132-
## Read the properties of a Resource Group
132+
## Read properties
133133
134134
Use the access token retrieved in the previous step to access Azure Resource Manager, and read the properties of the Resource Group you granted your user-assigned identity access. Replace `<SUBSCRIPTION ID>` with the subscription id of your environment.
135135

0 commit comments

Comments
 (0)