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/how-manage-user-assigned-managed-identities.md
:::image type="content" source="media/how-manage-user-assigned-managed-identities/create-user-assigned-managed-identity-portal.png" alt-text="Screenshot that shows the Create User Assigned Managed Identity pane.":::
49
49
50
50
1. Select **Review + create** to review the changes.
@@ -83,7 +83,7 @@ In some environments, administrators choose to limit who can manage user-assigne
83
83
1. A list of the user-assigned managed identities for your subscription is returned. Select the user-assigned managed identity that you want to manage.
84
84
1. Select **Access control (IAM)**.
85
85
1. Choose **Add role assignment**.
86
-
86
+
87
87

88
88
89
89
1. In the **Add role assignment** pane, choose the role to assign and choose **Next**.
@@ -106,10 +106,10 @@ In this article, you learn how to create, list, delete, or assign a role to a us
> To modify user permissions when you use an app service principal by using the CLI, you must provide the service principal more permissions in the Azure Active Directory Graph API because portions of the CLI perform GET requests against the Graph API. Otherwise, you might end up receiving an "Insufficient privileges to complete the operation" message. To do this step, go into the **App registration** in Azure AD, select your app, select **API permissions**, and scroll down and select **Azure Active Directory Graph**. From there, select **Application permissions**, and then add the appropriate permissions.
109
+
> [!IMPORTANT]
110
+
> To modify user permissions when you use an app service principal by using the CLI, you must provide the service principal more permissions in the Azure Active Directory Graph API because portions of the CLI perform GET requests against the Graph API. Otherwise, you might end up receiving an "Insufficient privileges to complete the operation" message. To do this step, go into the **App registration** in Azure AD, select your app, select **API permissions**, and scroll down and select **Azure Active Directory Graph**. From there, select **Application permissions**, and then add the appropriate permissions.
111
111
112
-
## Create a user-assigned managed identity
112
+
## Create a user-assigned managed identity
113
113
114
114
To create a user-assigned managed identity, your account needs the [Managed Identity Contributor](../../role-based-access-control/built-in-roles.md#managed-identity-contributor) role assignment.
115
115
@@ -182,7 +182,7 @@ To use Azure PowerShell locally for this article instead of using Cloud Shell:
182
182
Connect-AzAccount
183
183
```
184
184
185
-
1. Install the [latest version of PowerShellGet](/powershell/scripting/gallery/installing-psget#for-systems-with-powershell-50-or-newer-you-can-install-the-latest-powershellget).
185
+
1. Install the [latest version of PowerShellGet](/powershell/gallery/powershellget/install-powershellget).
@@ -264,9 +264,9 @@ Resource Manager templates help you deploy new or modified resources defined by
264
264
- Use a [custom template from Azure Marketplace](../../azure-resource-manager/templates/deploy-portal.md#deploy-resources-from-custom-template) to create a template from scratch or base it on an existing common or [quickstart template](https://azure.microsoft.com/resources/templates/).
265
265
- Derive from an existing resource group by exporting a template. You can export them from either [the original deployment](../../azure-resource-manager/management/manage-resource-groups-portal.md#export-resource-groups-to-templates) or from the [current state of the deployment](../../azure-resource-manager/management/manage-resource-groups-portal.md#export-resource-groups-to-templates).
266
266
- Use a local [JSON editor (such as VS Code)](../../azure-resource-manager/templates/quickstart-create-templates-use-the-portal.md), and then upload and deploy by using PowerShell or the Azure CLI.
267
-
- Use the Visual Studio [Azure Resource Group project](../../azure-resource-manager/templates/create-visual-studio-deployment-project.md) to create and deploy a template.
267
+
- Use the Visual Studio [Azure Resource Group project](../../azure-resource-manager/templates/create-visual-studio-deployment-project.md) to create and deploy a template.
268
268
269
-
## Create a user-assigned managed identity
269
+
## Create a user-assigned managed identity
270
270
271
271
To create a user-assigned managed identity, your account needs the [Managed Identity Contributor](../../role-based-access-control/built-in-roles.md#managed-identity-contributor) role assignment.
272
272
@@ -340,7 +340,7 @@ In this article, you learn how to create, list, and delete a user-assigned manag
340
340
az account get-access-token
341
341
```
342
342
343
-
## Create a user-assigned managed identity
343
+
## Create a user-assigned managed identity
344
344
345
345
To create a user-assigned managed identity, your account needs the [Managed Identity Contributor](../../role-based-access-control/built-in-roles.md#managed-identity-contributor) role assignment.
For information on how to assign a user-assigned managed identity to an Azure VM or virtual machine scale set by using CURL, see:
413
-
-[Configure managed identities for Azure resources on an Azure VM using REST API calls](qs-configure-rest-vm.md#user-assigned-managed-identity)
413
+
-[Configure managed identities for Azure resources on an Azure VM using REST API calls](qs-configure-rest-vm.md#user-assigned-managed-identity)
414
414
-[Configure managed identities for Azure resources on a virtual machine scale set using REST API calls](qs-configure-rest-vmss.md#user-assigned-managed-identity)
415
415
416
416
Learn how to use [workload identity federation for managed identities](../develop/workload-identity-federation.md) to access Azure Active Directory (Azure AD) protected resources without managing secrets.
# Tutorial: Use a user-assigned managed identity on a Windows VM to access Azure Resource Manager
21
21
22
-
This tutorial explains how to create a user-assigned identity, assign it to a Windows Virtual Machine (VM), and then use that identity to access the Azure Resource Manager API. Managed Service Identities are automatically managed by Azure. They enable authentication to services that support Azure AD authentication, without needing to embed credentials into your code.
22
+
This tutorial explains how to create a user-assigned identity, assign it to a Windows Virtual Machine (VM), and then use that identity to access the Azure Resource Manager API. Managed Service Identities are automatically managed by Azure. They enable authentication to services that support Azure AD authentication, without needing to embed credentials into your code.
23
23
24
24
You learn how to:
25
25
26
26
> [!div class="checklist"]
27
27
> * Create a user-assigned managed identity
28
28
> * Assign your user-assigned identity to your Windows VM
29
-
> * Grant the user-assigned identity access to a Resource Group in Azure Resource Manager
30
-
> * Get an access token using the user-assigned identity and use it to call Azure Resource Manager
29
+
> * Grant the user-assigned identity access to a Resource Group in Azure Resource Manager
30
+
> * Get an access token using the user-assigned identity and use it to call Azure Resource Manager
@@ -58,7 +58,7 @@ To use Azure PowerShell locally for this article (rather than using Cloud Shell)
58
58
Connect-AzAccount
59
59
```
60
60
61
-
1. Install the [latest version of PowerShellGet](/powershell/scripting/gallery/installing-psget#for-systems-with-powershell-50-or-newer-you-can-install-the-latest-powershellget).
61
+
1. Install the [latest version of PowerShellGet](/powershell/gallery/powershellget/install-powershellget).
This section shows how to grant your user-assigned identity access to a Resource Group in Azure Resource Manager. Managed identities for Azure resources provide 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.
119
+
This section shows how to grant your user-assigned identity access to a Resource Group in Azure Resource Manager. Managed identities for Azure resources provide 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.
120
120
121
121
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.
122
122
@@ -141,7 +141,7 @@ CanDelegate: False
141
141
142
142
## Access data
143
143
144
-
### Get an access token
144
+
### Get an access token
145
145
146
146
For the remainder of the tutorial, you will work from the VM we created earlier.
147
147
@@ -153,7 +153,7 @@ For the remainder of the tutorial, you will work from the VM we created earlier.
153
153
154
154
4. Now that you have created a **Remote Desktop Connection** with the virtual machine, open **PowerShell** in the remote session.
155
155
156
-
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.
156
+
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.
157
157
158
158
```azurepowershell
159
159
$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"}
0 commit comments