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-to-use-vm-token.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ GET 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-0
72
72
|`http://169.254.169.254/metadata/identity/oauth2/token`| The managed identities for Azure resources endpoint for the Instance Metadata Service. |
73
73
|`api-version`| A query string parameter, indicating the API version for the IMDS endpoint. Use API version `2018-02-01` or greater. |
74
74
|`resource`| A query string parameter, indicating the App ID URI of the target resource. It also appears in the `aud` (audience) claim of the issued token. This example requests a token to access Azure Resource Manager, which has an App ID URI of `https://management.azure.com/`. |
75
-
|`Metadata`| An HTTP request header field. This field is required by managed identities as a mitigation against server side request forgery (SSRF) attacks. This value must be set to "true", in all lower case. |
75
+
|`Metadata`| An HTTP request header fieldrequired by managed identities. This information is used as a mitigation against server side request forgery (SSRF) attacks. This value must be set to "true", in all lower case. |
76
76
|`object_id`| (Optional) A query string parameter, indicating the object_id of the managed identity you would like the token for. Required, if your VM has multiple user-assigned managed identities.|
77
77
|`client_id`| (Optional) A query string parameter, indicating the client_id of the managed identity you would like the token for. Required, if your VM has multiple user-assigned managed identities.|
78
78
|`mi_res_id`| (Optional) A query string parameter, indicating the mi_res_id (Azure Resource ID) of the managed identity you would like the token for. Required, if your VM has multiple user-assigned managed identities. |
## Get a token using the Azure identity client library
107
107
108
-
Using the Azure identity client library is the recommended way to use managed identities. All Azure SDKs are integrated with the ```Azure.Identity``` library that provides support for DefaultAzureCredential. This class makes it easy to use Managed Identities with Azure SDKs.[Learn more](https://docs.microsoft.com/dotnet/api/overview/azure/identity-readme)
108
+
Using the Azure identity client library is the recommended way to use managed identities. All Azure SDKs are integrated with the ```Azure.Identity``` library that provides support for DefaultAzureCredential. This class makes it easy to use Managed Identities with Azure SDKs.[Learn more](/dotnet/api/overview/azure/identity-readme)
109
109
110
110
1. Install the [Azure.Identity](https://www.nuget.org/packages/Azure.Identity) package and other required [Azure SDK library packages](https://aka.ms/azsdk), such as [Azure.Security.KeyVault.Secrets](https://www.nuget.org/packages/Azure.Security.KeyVault.Secrets/).
111
111
2. Use the sample code below. You don't need to worry about getting tokens. You can directly use the Azure SDK clients. The code is for demonstrating how to get the token, if you need to.
@@ -376,7 +376,7 @@ This section documents the possible error responses. A "200 OK" status is a succ
376
376
377
377
|Statuscode|Error|ErrorDescription|Solution|
378
378
|-----------|-----|-----------------|--------|
379
-
|400BadRequest|invalid_resource|AADSTS50001: Theapplicationnamed*\<URI\>*wasn't found in the tenant named *\<TENANT-ID\>*. This message shows if the application hasn'tbeeninstalledbythetenantadministratororconsentedtobyanyuserinthetenant. Youmighthavesentyourauthenticationrequesttothewrongtenant.\ | (Linuxonly) |
379
+
|400BadRequest|invalid_resource|AADSTS50001: Theapplicationnamed*\<URI\>*wasn't found in the tenant named *\<TENANT-ID\>*. This message shows if the tenant administrator hasn'tinstalledtheapplicationornotenantuserconsentedtoit. Youmighthavesentyourauthenticationrequesttothewrongtenant.\ | (Linuxonly) |
|401Unauthorized|unknown_source|UnknownSource*\<URI\>*|VerifythatyourHTTPGETrequestURIisformattedcorrectly. The `scheme:host/resource-path` portionmustbespecifiedas `http://localhost:50342/oauth2/token`. See the "Sample request" in the preceding REST section for an example.|
0 commit comments