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/active-directory/managed-identities-azure-resources/tutorial-windows-vm-ua-arm.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.devlang: na
12
12
ms.topic: tutorial
13
13
ms.tgt_pltfrm: na
14
14
ms.workload: identity
15
-
ms.date: 04/10/2018
15
+
ms.date: 01/10/2020
16
16
ms.author: markvi
17
17
ms.collection: M365-identity-device-management
18
18
---
@@ -49,9 +49,9 @@ You learn how to:
49
49
- 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).
50
50
- 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.
51
51
52
-
## Create a user-assigned identity
52
+
## Create identity
53
53
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.
## Assign the user-assigned identity to a Windows VM
78
+
## Assign identity
79
79
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.
## Grant your user-assigned identity access to a Resource Group in Azure Resource Manager
87
+
## Grant access
88
88
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.
90
90
91
91
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.
92
92
@@ -109,7 +109,7 @@ ObjectType: ServicePrincipal
109
109
CanDelegate: False
110
110
```
111
111
112
-
## Get an access token using the VM's identity and use it to call Resource Manager
112
+
## Get an access token
113
113
114
114
For the remainder of the tutorial, you will work from the VM we created earlier.
115
115
@@ -121,15 +121,15 @@ For the remainder of the tutorial, you will work from the VM we created earlier.
121
121
122
122
4. Now that you have created a **Remote Desktop Connection** with the virtual machine, open **PowerShell** in the remote session.
123
123
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.
125
125
126
126
```azurepowershell
127
127
$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"}
128
128
$content = $response.Content | ConvertFrom-Json
129
129
$ArmToken = $content.access_token
130
130
```
131
131
132
-
## Read the properties of a Resource Group
132
+
## Read properties
133
133
134
134
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.
0 commit comments