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
Managed identities for Azure resources eliminate the need to manage credentials in code. You can use them to get an Azure Active Directory (Azure AD) token your applicationscan use when you access resources that support Azure AD authentication. Azure manages the identity so you don't have to.
22
+
Managed identities for Azure resources eliminate the need to manage credentials in code. You can use them to get an Azure Active Directory (Azure AD) token for your applications. The applications can use the token when accessing resources that support Azure AD authentication. Azure manages the identity so you don't have to.
23
23
24
-
There are two types of managed identities: system-assigned and user-assigned. The main difference between them is that system-assigned managed identities have their lifecycle linked to the resource where they're used. User-assigned managed identities can be used on multiple resources. To learn more about managed identities, see [What are managed identities for Azure resources?](overview.md).
24
+
There are two types of managed identities: system-assigned and user-assigned. System-assigned managed identities have their lifecycle tied to the resource that created them. User-assigned managed identities can be used on multiple resources. To learn more about managed identities, see [What are managed identities for Azure resources?](overview.md).
25
25
26
26
::: zone pivot="identity-mi-methods-azp"
27
+
27
28
In this article, you learn how to create, list, delete, or assign a role to a user-assigned managed identity by using the Azure portal.
28
29
29
30
## Prerequisites
@@ -36,7 +37,7 @@ In this article, you learn how to create, list, delete, or assign a role to a us
36
37
37
38
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.
38
39
39
-
1. Sign in to the [Azure portal](https://portal.azure.com) by using an account associated with the Azure subscription to create the user-assigned managed identity.
40
+
1. Sign in to the [Azure portal](https://portal.azure.com).
40
41
1. In the search box, enter **Managed Identities**. Under **Services**, select **Managed Identities**.
41
42
1. Select **Add**, and enter values in the following boxes in the **Create User Assigned Managed Identity** pane:
42
43
-**Subscription**: Choose the subscription to create the user-assigned managed identity under.
@@ -53,9 +54,9 @@ To create a user-assigned managed identity, your account needs the [Managed Iden
53
54
54
55
## List user-assigned managed identities
55
56
56
-
To list or read a user-assigned managed identity, your account needs the [Managed Identity Operator](../../role-based-access-control/built-in-roles.md#managed-identity-operator) or [Managed Identity Contributor](../../role-based-access-control/built-in-roles.md#managed-identity-contributor) role assignment.
57
+
To list or read a user-assigned managed identity, your account needs to have either [Managed Identity Operator](../../role-based-access-control/built-in-roles.md#managed-identity-operator) or [Managed Identity Contributor](../../role-based-access-control/built-in-roles.md#managed-identity-contributor) role assignments.
57
58
58
-
1. Sign in to the [Azure portal](https://portal.azure.com) by using an account associated with the Azure subscription to list the user-assigned managed identities.
59
+
1. Sign in to the [Azure portal](https://portal.azure.com).
59
60
1. In the search box, enter **Managed Identities**. Under **Services**, select **Managed Identities**.
60
61
1. A list of the user-assigned managed identities for your subscription is returned. To see the details of a user-assigned managed identity, select its name.
61
62
1. You can now view the details about the managed identity as shown in the image below.
@@ -68,7 +69,7 @@ To delete a user-assigned managed identity, your account needs the [Managed Iden
68
69
69
70
Deleting a user-assigned identity doesn't remove it from the VM or resource it was assigned to. To remove the user-assigned identity from a VM, see [Remove a user-assigned managed identity from a VM](qs-configure-portal-windows-vm.md#remove-a-user-assigned-managed-identity-from-a-vm).
70
71
71
-
1. Sign in to the [Azure portal](https://portal.azure.com) by using an account associated with the Azure subscription to delete a user-assigned managed identity.
72
+
1. Sign in to the [Azure portal](https://portal.azure.com).
72
73
1. Select the user-assigned managed identity, and select **Delete**.
73
74
1. Under the confirmation box, select **Yes**.
74
75
@@ -79,7 +80,7 @@ Deleting a user-assigned identity doesn't remove it from the VM or resource it w
79
80
80
81
To assign a role to a user-assigned managed identity, your account needs the [User Access Administrator](../../role-based-access-control/built-in-roles.md#user-access-administrator) role assignment.
81
82
82
-
1. Sign in to the [Azure portal](https://portal.azure.com) by using an account associated with the Azure subscription to list the user-assigned managed identities.
83
+
1. Sign in to the [Azure portal](https://portal.azure.com).
83
84
1. In the search box, enter **Managed Identities**. Under **Services**, select **Managed Identities**.
84
85
1. A list of the user-assigned managed identities for your subscription is returned. Select the user-assigned managed identity that you want to assign a role.
85
86
1. Select **Access control (IAM)**, and then select **Add role assignment**.
@@ -261,10 +262,10 @@ You can't list and delete a user-assigned managed identity by using a Resource M
261
262
262
263
## Template creation and editing
263
264
264
-
As with the Azure portal and scripting, Resource Manager templates provide the ability to deploy new or modified resources defined by an Azure resource group. Several options are available for template editing and deployment, both local and portal-based. You can:
265
+
Resource Manager templates help you deploy new or modified resources defined by an Azure resource group. Several options are available for template editing and deployment, both local and portal-based. You can:
265
266
266
267
- 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/).
267
-
- Derive from an existing resource group by exporting a template 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).
268
+
- 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).
268
269
- 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.
269
270
- Use the Visual Studio [Azure Resource Group project](../../azure-resource-manager/templates/create-visual-studio-deployment-project.md) to create and deploy a template.
270
271
@@ -306,9 +307,7 @@ To create a user-assigned managed identity, use the following template. Replace
306
307
```
307
308
## Next steps
308
309
309
-
For information on how to assign a user-assigned managed identity to an Azure VM by using a Resource Manager template, see [Configure managed identities for Azure resources on an Azure VM using a template](qs-configure-template-windows-vm.md).
310
-
311
-
310
+
To assign a user-assigned managed identity to an Azure VM using a Resource Manager template, see [Configure managed identities for Azure resources on an Azure VM using a template](qs-configure-template-windows-vm.md).
Copy file name to clipboardExpand all lines: articles/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-nonaad.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.subservice: msi
12
12
ms.topic: tutorial
13
13
ms.tgt_pltfrm: na
14
14
ms.workload: identity
15
-
ms.date: 01/11/2022
15
+
ms.date: 02/18/2022
16
16
ms.author: barclayn
17
17
ms.collection: M365-identity-device-management
18
18
#Customer intent: As a developer or administrator I want to configure a Windows virtual machine to retrieve a secret from key vault using a managed identity and have a simple way to validate my configuration before using it for development
This tutorial shows you how a Windows virtual machine (VM) can use a system-assigned managed identity to access [Azure Key Vault](../../key-vault/general/overview.md). Serving as a bootstrap, Key Vault makes it possible for your client application to then use a secret to access resources not secured by Azure Active Directory (AD). Managed Service Identities are automatically managed by Azure and enable you to authenticate to services that support Azure AD authentication, without including authentication information in your code.
25
+
This tutorial shows you how a Windows virtual machine (VM) can use a system-assigned managed identity to access [Azure Key Vault](../../key-vault/general/overview.md). Key Vault makes it possible for your client application to use a secret to access resources not secured by Azure Active Directory (Azure AD). Managed identities are automatically managed by Azure. They enable you to authenticate to services that support Azure AD authentication, without including authentication information in your code.
26
26
27
27
You learn how to:
28
28
@@ -40,7 +40,7 @@ You learn how to:
40
40
41
41
## Create a Key Vault
42
42
43
-
This section shows how to grant your VM access to a secret stored in a Key Vault. Using managed identities for Azure resources, your code can get access tokens to authenticate to resources that support Azure AD authentication. However, not all Azure services support Azure AD authentication. To use managed identities for Azure resources with those services, store the service credentials in Azure Key Vault, and use the VM's managed identity to access Key Vault to retrieve the credentials.
43
+
This section shows how to grant your VM access to a secret stored in a Key Vault. When you use managed identities for Azure resources, your code can get access tokens to authenticate to resources that support Azure AD authentication. However, not all Azure services support Azure AD authentication. To use managed identities for Azure resources with those services, store the service credentials in Azure Key Vault, and use the VM's managed identity to access Key Vault to retrieve the credentials.
44
44
45
45
First, we need to create a Key Vault and grant our VM’s system-assigned managed identity access to the Key Vault.
46
46
@@ -53,35 +53,35 @@ First, we need to create a Key Vault and grant our VM’s system-assigned manage
53
53
54
54

55
55
56
-
1. Fill out all required information making sure that you choose the subscription and resource group where you created the virtual machine that you are using for this tutorial.
56
+
1. Fill out all required information. Make sure that you choose the subscription and resource group that you're using for this tutorial.
57
57
1. Select **Review+ create**
58
58
1. Select **Create**
59
59
60
60
### Create a secret
61
61
62
-
Next, add a secret to the Key Vault, so you can retrieve it later using code running in your VM. In this tutorial, we are using PowerShell but the same concepts apply to any code executing in this virtual machine.
62
+
Next, add a secret to the Key Vault, so you can retrieve it later using code running in your VM. In this tutorial, we're using PowerShell but the same concepts apply to any code executing in this virtual machine.
63
63
64
64
1. Navigate to your newly created Key Vault.
65
-
1. Select **Secrets**, and click**Add**.
65
+
1. Select **Secrets**, and select**Add**.
66
66
1. Select **Generate/Import**
67
-
1. In the **Create a secret** screen from **Upload options** leave **Manual** selected.
67
+
1. In the **Create a secret** screen, from **Upload options** leave **Manual** selected.
68
68
1. Enter a name and value for the secret. The value can be anything you want.
69
69
1. Leave the activation date and expiration date clear, and leave **Enabled** as **Yes**.
70
-
1.Click**Create** to create the secret.
70
+
1.Select**Create** to create the secret.
71
71
72
72

73
73
74
74
## Grant access
75
75
76
-
The managed identity used by the virtual machine needs to be granted access to read the secret that we will store in the Key Vault.
76
+
The managed identity used by the virtual machine needs to be granted access to read the secret that we'll store in the Key Vault.
77
77
78
78
1. Navigate to your newly created Key Vault
79
79
1. Select **Access Policy** from the menu on the left side.
1. In the **Add access policy** section under **Configure from template (optional)** choose **Secret Management** from the pull-down menu.
84
+
1. In the **Add access policy** section, under **Configure from template (optional)**, choose **Secret Management** from the pull-down menu.
85
85
1. Choose **Select Principal**, and in the search field enter the name of the VM you created earlier. Select the VM in the result list and choose **Select**.
86
86
1. Select **Add**
87
87
1. Select **Save**.
@@ -93,9 +93,9 @@ This section shows how to get an access token using the VM identity and use it t
93
93
94
94
First, we use the VM’s system-assigned managed identity to get an access token to authenticate to Key Vault:
95
95
96
-
1. In the portal, navigate to **Virtual Machines** and go to your Windows virtual machine and in the **Overview**, click**Connect**.
96
+
1. In the portal, navigate to **Virtual Machines** and go to your Windows virtual machine and in the **Overview**, select**Connect**.
97
97
2. Enter in your **Username** and **Password** for which you added when you created the **Windows VM**.
98
-
3. Now that you have created a **Remote Desktop Connection** with the virtual machine, open PowerShell in the remote session.
98
+
3. Now that you've created a **Remote Desktop Connection** with the virtual machine, open PowerShell in the remote session.
99
99
4. In PowerShell, invoke the web request on the tenant to get the token for the local host in the specific port for the VM.
100
100
101
101
The PowerShell request:
@@ -134,11 +134,11 @@ Once you’ve retrieved the secret from the Key Vault, you can use it to authent
134
134
135
135
When you want to clean up the resources, visit the [Azure portal](https://portal.azure.com), select **Resource groups**, locate, and select the resource group that was created in the process of this tutorial (such as `mi-test`), and then use the **Delete resource group** command.
136
136
137
-
Alternatively you may also do this via [PowerShell or the CLI](../../azure-resource-manager/management/delete-resource-group.md)
137
+
Alternatively you may also clean up resources via [PowerShell or the CLI](../../azure-resource-manager/management/delete-resource-group.md)
138
138
139
139
## Next steps
140
140
141
-
In this tutorial, you learned how to use a Windows VM system-assigned managed identity to access Azure Key Vault. To learn more about Azure Key Vault see:
141
+
In this tutorial, you learned how to use a Windows VM system-assigned managed identity to access Azure Key Vault. To learn more about Azure Key Vault, see:
0 commit comments