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-managed-identities-work-vm.md
+19-4Lines changed: 19 additions & 4 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.devlang:
13
13
ms.topic: conceptual
14
14
ms.custom: mvc
15
-
ms.date: 10/30/2022
15
+
ms.date: 11/15/2022
16
16
ms.author: barclayn
17
17
ms.collection: M365-identity-device-management
18
18
---
@@ -33,7 +33,7 @@ Your code can use a managed identity to request access tokens for services that
33
33
34
34
The following diagram shows how managed service identities work with Azure virtual machines (VMs):
35
35
36
-
[](media/how-managed-identities-work-vm/data-flow.png#lightbox)
36
+
[](media/how-managed-identities-work-vm/data-flow.png#lightbox)
37
37
38
38
The following table shows the differences between the system-assigned and user-assigned managed identities:
39
39
@@ -52,12 +52,18 @@ The following table shows the differences between the system-assigned and user-a
52
52
53
53
3. Azure Resource Manager updates the VM identity using the Azure Instance Metadata Service identity endpoint (for [Windows](/azure/virtual-machines/windows/instance-metadata-service) and [Linux](/azure/virtual-machines/linux/instance-metadata-service)), providing the endpoint with the service principal client ID and certificate.
54
54
55
-
4. After the VM has an identity, use the service principal information to grant the VM access to Azure resources. To call Azure Resource Manager, use Azure role-based access control (Azure RBAC) to assign the appropriate role to the VM service principal. To call Key Vault, grant your code access to the specific secret or key in Key Vault.
55
+
4. After the VM has an identity, use the service principal information to grant the VM access to Azure resources. To call Azure Resource Manager, use Azure Role-Based Access Control (Azure RBAC) to assign the appropriate role to the VM service principal. To call Key Vault, grant your code access to the specific secret or key in Key Vault.
56
56
57
57
5. Your code that's running on the VM can request a token from the Azure Instance Metadata service endpoint, accessible only from within the VM: `http://169.254.169.254/metadata/identity/oauth2/token`
58
58
- The resource parameter specifies the service to which the token is sent. To authenticate to Azure Resource Manager, use `resource=https://management.azure.com/`.
59
59
- API version parameter specifies the IMDS version, use api-version=2018-02-01 or greater.
60
60
61
+
The following example demonstrates how to to use CURL to make a request to the local Managed Identity endpoint to get an access token for Azure Instance Metadata service.
6. A call is made to Azure AD to request an access token (as specified in step 5) by using the client ID and certificate configured in step 3. Azure AD returns a JSON Web Token (JWT) access token.
62
68
63
69
7. Your code sends the access token on a call to a service that supports Azure AD authentication.
@@ -77,9 +83,18 @@ The following table shows the differences between the system-assigned and user-a
77
83
78
84
5. Your code that's running on the VM can request a token from the Azure Instance Metadata Service identity endpoint, accessible only from within the VM: `http://169.254.169.254/metadata/identity/oauth2/token`
79
85
- The resource parameter specifies the service to which the token is sent. To authenticate to Azure Resource Manager, use `resource=https://management.azure.com/`.
80
-
- The client ID parameter specifies the identity for which the token is requested. This value is required for disambiguation when more than one user-assigned identity is on a single VM.
86
+
- The `client_id` parameter specifies the identity forwhich the token is requested. This value is required for disambiguation when more than one user-assigned identity is on a single VM. You can find the **Client ID**in the Managed Identity **Overview**:
87
+
88
+
[](./media/how-managed-identities-work-vm/managed-identity-client-id.png#lightbox)
89
+
81
90
- The API version parameter specifies the Azure Instance Metadata Service version. Use `api-version=2018-02-01` or higher.
82
91
92
+
The following example demonstrates how to to use CURL to make a request to the local Managed Identity endpoint to get an access token for Azure Instance Metadata service.
6. A call is made to Azure AD to request an access token (as specified in step 5) by using the client ID and certificate configured in step 3. Azure AD returns a JSON Web Token (JWT) access token.
84
99
7. Your code sends the access token on a call to a service that supports Azure AD authentication.
0 commit comments