
Sample request using the Azure Instance Metadata Service (IMDS) endpoint (recommended): GET '' HTTP/1.1 Metadata: true This approach is similar to the Azure AD programming model, except the client uses an endpoint on the virtual machine (vs an Azure AD endpoint). The fundamental interface for acquiring an access token is based on REST, making it accessible to any client application running on the VM that can make HTTP REST calls. Where to get resource IDs for supported Azure services Guidance for handling HTTP errors returned from the managed identities for Azure resources token endpoint Guidance for handling expired access tokens NET clientĮxample of using managed identities for Azure resources REST endpoint from a C# clientĮxample of using managed identities for Azure resources REST endpoint from a Java clientĮxample of using managed identities for Azure resources REST endpoint from a Go clientĮxample of using managed identities for Azure resources REST endpoint from a PowerShell clientĮxample of using managed identities for Azure resources REST endpoint from a Bash/CURL client Protocol details for managed identities for Azure resources token endpoint Service-to-service calls requiring client credentials. The token is suitable for use as a bearer token in As such, there's no need for the client to obtain an access token under its own service principal. The token is based on the managed identities for Azure resources service principal. All code/scripts running on a virtual machine can request and retrieve tokens for any managed identities available on it.Ī client application can request a managed identity app-only access token to access a given resource. The security boundary of managed identities for Azure resources, is the resource it's being used on.If you plan to use the Azure PowerShell examples in this article, be sure to install the latest version of Azure PowerShell. If you don't have an Azure account, sign up for a free account before you continue. If you're not familiar with the managed identities for Azure resources feature, see this overview.It also contains guidance about handling token expiration and HTTP errors. This article provides various code and script examples for token acquisition. You can use this identity to authenticate to any service that supports Azure AD authentication, without having credentials in your code. Managed identities for Azure resources provide Azure services with an automatically managed identity in Azure Active Directory. Make sure you review the availability status of managed identities for your resource and known issues before you begin. Each of the Azure services that support managed identities for Azure resources are subject to their own timeline. Managed identities for Azure resources is a feature of Azure Active Directory.
