Is there a concept of service accounts in entra id?

Adi Malyanker 70 Reputation points
2024-02-11T12:49:59.55+00:00

Hi,

Is there a concept of service accounts in entra id?
I read some articles saying that managed identity accounts and service principles are service accounts. I am not sure it is the definition of service accounts in entra id.

So are there service accounts in entra id and how can I detect them?

Thanks

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Vasil Michev 119.9K Reputation points MVP Volunteer Moderator
    2024-02-11T15:52:13.25+00:00

    That would depend on what your definition of a service account is :)

    The idea behind managed identities is to have a "principal" with access to some resources, for which credentials are automatically handled by the system. Managed identities are represented by a service principal within your own tenant, the difference between the two being that you are the one responsible for managing credentials for a service principal. Both can be used for automation scenarios, with service principals being available for both delegate (in the context of a user) and application flows, whereas managed identity only supports the latter.

    If you need to perform certain operations in the context of a user object, you can also use a service principal, or simply create a user account, assign the relevant permissions and roles, and use its own credentials. Generally speaking, such scenarios are harder to automate, as authentication must be performed interactively, unless you want to use insecure flows.


  2. Michael Mardahl 0 Reputation points MVP
    2024-02-11T16:16:50.11+00:00

    Short answer: Yes. And you found them.

    But if you are comparing to on-prem Active Directory. It would be similar - you create an account, and you use it specifically to run a single service, in the context of that account. Detecting such accounts might be hard, as they are essentially a regular user.
    But to view Entra ID native Service Principals, it is just a matter of opening the "Enterprise Applications" or "App registrations" blade in Entra ID- those places list all Service Principals and Managed Identities. You can detect them with Graph API queries, or create custom KQL in Azure Sentinel.
    Here are a few links that might inspire you:
    https://learn.microsoft.com/en-us/graph/api/serviceprincipal-list?view=graph-rest-1.0&tabs=http https://learnsentinel.blog/2022/01/04/azuread-privesc-sentinel/


  3. Pinaki Ghatak 5,600 Reputation points Microsoft Employee Volunteer Moderator
    2024-02-12T11:03:47.28+00:00

    Hello @Adi Malyanker The following comparison table may help you.

    Aspect On-Premises Service Account Azure Service Principal Managed Identity
    Definition User account for services running on local servers or systems. Security object within an Azure AD application that defines what an application can do in a given tenant. Azure resource identity that allows services to authenticate without explicit credentials.
    Definition User account for services running on local servers or systems. Security object within an Azure AD application that defines what an application can do in a given tenant. Azure resource identity that allows services to authenticate without explicit credentials.
    Authentication Method Username/password or Kerberos/NTLM tokens. Client ID and client secret or certificate. Automatically managed by Azure AD. No explicit credentials needed.
    Use Case Traditional applications running on-premises servers. Azure services and applications accessing Azure resources. Azure services and applications accessing Azure resources.
    Credential Management Manual rotation and maintenance. Manual rotation and maintenance. Automatically handled by Azure AD.
    Scope of Access Limited to on-premises resources. Can access Azure resources based on permissions. Can access Azure resources based on permissions.
    Rotation Frequency Manual rotation as needed. Manual rotation as needed. Automatic rotation by Azure AD.
    Security Best Practice Least privilege principle. Regular password changes. Least privilege principle. Regular secret/certificate rotation. Least privilege principle. No explicit credentials to manage.

    Remember that while Service Principals and Managed Identities are similar, Managed Identities are more convenient for Azure resources due to automatic credential management and rotation.

    If this helps you, please tag this as accepted answer as it may help further community members.


Your answer

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