Share via

Can Azure Terraform Authentication Be Done with a Microsoft Entra ID Account Instead of a Microsoft Account?

AzureTest04 180 Reputation points
2026-03-05T23:50:59.7166667+00:00

I am planning to authenticate Azure and Terraform using the procedure described

below: https://learn.microsoft.com/en-us/azure/developer/terraform/authenticate-to-azure-with-microsoft-account

The above document explains the authentication method using a Microsoft account. Can the same procedure be used with a Microsoft Entra ID account?

Or are the steps different when using a Microsoft account versus a Microsoft Entra ID account?

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments

Answer accepted by question author

Rukmini 42,515 Reputation points Microsoft External Staff Moderator
2026-03-06T00:02:28.6633333+00:00

Hello Azure検証ユーザー

Yes, a Microsoft Entra ID account can be used in the same way. Because authentication is carried out via the Azure CLI (az login), which supports both account types, the procedures in the document are applicable to both Microsoft personal accounts (MSA) and Microsoft Entra ID (work or school) accounts.

  • Both Microsoft accounts and Entra ID accounts require the same authentication procedures.
  • The type of account used to log in (personal vs. work/school) is the only difference.
  • It is advised to utilize a Service Principal or Managed Identity rather than a user account for automation or production Terraform deployments.

Let me know if any further queries - feel free to reach out!

If the resolution was helpful, kindly take a moment to click on 210246-screenshot-2021-12-10-121802.pngand click on Yes for was this answer helpful. And, if you have any further query do let us know.

Was this answer helpful?

1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-03-05T23:51:12.7466667+00:00

    The procedure in the referenced article is specifically for signing in with a Microsoft account (personal account) and managing Azure subscriptions associated with that Microsoft account.

    Microsoft Entra ID (work or school account) is a different identity system from a Microsoft account, so the steps are not identical. When using Microsoft Entra ID:

    • The identity is an Entra ID user, service principal, or managed identity, not a Microsoft account.
    • Authentication is typically done via Microsoft Entra ID app registration, service principal, or managed identity, and then assigning appropriate RBAC roles to that identity.
    • The flow follows the pattern described for Entra ID–based authentication: register an application in Microsoft Entra ID, add a client secret (or certificate), assign RBAC roles, obtain an access token, and then use that token (or the corresponding credentials) from Terraform.

    The article on authenticating to Azure with a Microsoft account therefore cannot be used as-is for Microsoft Entra ID accounts; Entra ID authentication requires the Entra-specific steps (app registration, RBAC, token acquisition) rather than the Microsoft account–centric flow.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.