Is Azure supports instance profile like AWS?

Diksha Singh 60 Reputation points

I use the Instance profile in Aws to update or edit the instance details. So I want to try the same thing on Azure.

Does Azure have an instance profile feature?

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,180 questions
{count} votes

Accepted answer
  1. Prrudram-MSFT 22,931 Reputation points

    Hello @Diksha Singh

    Azure does not have an instance profile feature like AWS. However, Azure provides a similar feature called Managed Service Identity (MSI) that allows you to authenticate to Azure services without the need for credentials in your code. MSI provides an automatically managed identity in Azure Active Directory (Azure AD) that can be used to authenticate to any service that supports Azure AD authentication. like the following Aure services such as Azure Key Vault, Azure Resource Manager, and Azure Storage.

    To use MSI, you can retrieve the access token from the Azure Instance Metadata Service (IMDS) endpoint, which is similar to the AWS Instance Metadata Service. The IMDS endpoint provides information about the Azure VM instance, including the MSI endpoint and the access token.

    Here is an example of how to retrieve the access token from the IMDS endpoint using PowerShell:

    $accessToken = Invoke-RestMethod -Uri "" -Headers @{Metadata="true"} -Method GET -UseBasicParsing

    In this example, the $accessToken variable contains the access token that can be used to authenticate to Azure services that support Azure AD authentication.

    Note that not all Azure services support MSI, so you will need to check the documentation for each service to see if it is supported. Also, MSI is not a feature of Azure VMs by default, so you will need to enable it on the VM using the Azure portal, Azure CLI, or PowerShell.

    If this does answer your question, please accept it as the answer as a token of appreciation.

0 additional answers

Sort by: Most helpful