9.3 Service Principals Fundamentals

Key Takeaways

  • A service principal is the tenant-local security principal (enterprise application instance) for an application; the application object (app registration) is the global multi-tenant definition.
  • Prefer certificate credentials or federated identity credentials over long-lived client secrets for service principal authentication.
  • Owners, API permissions, role assignments, and credential expiry define the operational lifecycle you must govern for workload identities.
  • App registrations (detailed in the next chapter) create the application model; service principals are what receive permissions and sign in within each tenant.
  • Workload identity security basics include least privilege, credential hygiene, monitoring service principal sign-ins, and avoiding user-account impersonation for daemons.
Last updated: July 2026

Service principals on the SC-300 map

When a workload cannot use a managed identity—or when you are modeling a multi-tenant application, CI/CD pipeline, or daemon that needs Graph/application permissions—you work with service principals. Domain 3 expects you to know what they are, how they relate to app registrations and enterprise applications, how they authenticate, and how to keep them secure.

This section is fundamentals. The next chapter of this guide deepens enterprise applications and app registrations (permissions, consent, app roles). Here, build a precise mental model and the security habits that keep workload identities from becoming silent Tier-0 risks.

/practice/azure-sc-300Practice questions with detailed explanations

Application object versus service principal

Microsoft Entra uses a two-layer application model:

ObjectAlso calledScopeRole
Application objectApp registrationHome tenant (definition); can be multi-tenantBlueprint: identifiers, redirect URIs, branding, exposed APIs, credential configuration, required permissions
Service principalEnterprise application (instance)Each tenant where the app is usedConcrete identity that can sign in, be assigned roles, and receive consent

When you register an app in App registrations, Entra creates the application object in your tenant and usually a service principal in the same tenant. When a multi-tenant app is consented into a customer tenant, that customer gets their own service principal (enterprise app) without owning the app registration.

Managed identities are a special case: Azure creates and manages a service principal for you without you building a full customer-facing app registration experience.

Exam phrasing tips:

  • “Grant the app access in this tenant” → think service principal / enterprise application assignments and permissions.
  • “Define redirect URIs, expose an API, configure platform auth” → app registration.
  • “Who signed in non-interactively at 02:00?” → service principal sign-in logs.

Enterprise applications and the SP you administer

In the Microsoft Entra admin center, Enterprise applications is where identity admins commonly:

  • Find the service principal for a SaaS app or custom app.
  • Assign users and groups (for apps that use user assignment required).
  • Configure SSO properties for gallery/SAML apps (deeper next chapter).
  • Review permissions granted (delegated and application).
  • Set owners for operational accountability.
  • Disable sign-in for an app instance in the tenant when needed.

For workload scenarios (daemon, pipeline), you often care less about user SSO and more about:

  1. Credentials on the app registration (secret, cert, federated credential).
  2. Application permissions (app roles on Graph or your API) versus delegated permissions.
  3. Azure RBAC assignments to the service principal on subscriptions and resources.
  4. Owners and access reviews of those privileged machine identities.
Workload needSP-related control
Deploy to one subscriptionAzure RBAC on SP (for example Contributor on RG)
Read all users as a daemonMicrosoft Graph application permission + admin consent
Act only when a user is presentDelegated permissions + user/app context (not pure daemon)
Restrict who can use a interactive appUser assignment required + group assignment on enterprise app

Credentials: secrets, certificates, federation

Service principals authenticate with credentials configured on the application object (and presented by the instance):

Credential typeHow it worksSC-300 preference
Client secretPassword-like string; client_id + secret in client credentials flowAvoid long-lived secrets; short expiry if unavoidable
CertificateApp holds private key; Entra validates assertionPreferred over secrets for many org policies
Federated identity credentialExternal IdP (GitHub, Kubernetes, other Entra) issues token; Entra trusts issuer/subjectPreferred for CI/CD and cloud-native federation—no long-lived Azure secret in the pipeline

Why certificates beat secrets in exam answers: secrets are easy to paste into repos, pipelines, and tickets; certificates bind to key material that can live in Key Vault or a secure agent store with clearer rotation. Federation goes further by eliminating a stored Azure credential in GitHub secrets for deployment identities.

Operational rules:

  • Track expiry; expired credentials cause sudden production outages.
  • Prefer two certificates during rotation (overlap) so you never hard-cut.
  • Restrict who can add credentials (app owners, Application Administrator, Cloud Application Administrator—understand privileged roles from Domain 1).
  • Never embed secrets in mobile apps or public SPA code; public clients use different auth patterns (user-interactive, PKCE)—daemons are confidential clients.

Ownership and lifecycle

Treat service principals as non-human identities with a full lifecycle:

  1. Create — app registration + SP, or consent to a multi-tenant app, or Azure creates MI SP.
  2. Configure — permissions, roles, credentials, owners.
  3. Authorize — admin consent for application permissions; Azure RBAC for Azure resources; app role assignments.
  4. Operate — rotate credentials, monitor sign-ins, respond to Identity Protection risky workload signals where licensed/features apply.
  5. Review — access reviews for highly privileged SPs; owner recertification.
  6. Retire — remove credentials, delete role assignments, disable enterprise app sign-in, delete app registration when appropriate.
Lifecycle riskMitigation
Orphaned SP after project endsOwners required; regular inventory
Over-privileged Graph rolesLeast privilege; prefer narrower permissions
Secret in Git historyCertificate/federation; secret scanning; rotate immediately
Unknown apps in tenantEnterprise app review; consent policies (next chapter)
Shared “deploy SP” for all teamsSplit identities per pipeline/environment

Owners on app registrations and enterprise applications create accountability. An app with no owner and a client secret that never expires is a classic audit finding.

Relationship to app registrations (preview of next chapter)

You do not need full app-registration mastery yet, but you must not confuse the layers:

  • App registration — developer/identity-admin definition: Application (client) ID, directory (tenant) ID, platforms, certificates & secrets, API permissions list, expose an API, app roles, token configuration, optional claims.
  • Service principal — the running instance in a tenant that actually receives consent and uses assigned access.
  • Enterprise application blade — admin-centric view of that SP plus SSO and assignment features for many SaaS patterns.

Daemon pattern at SC-300 level:

  1. Register application (public client false—confidential client).
  2. Create certificate or federated credential (or short-lived secret if forced).
  3. Add application permissions (for example Mail.Read application—if truly required—or better, narrower custom API roles).
  4. Grant admin consent in the tenant.
  5. Run client credentials flow from the secure host.
  6. Call the API with the access token.

User-delegated patterns use authorization code flow and delegated permissions—different from pure workload daemons. Conditional Access can still apply to workload identities in modern “secure workload identities” designs; know that identity protection for workload identities is an evolving control area (linked from Domain 2 risky workloads topics).

Workload identity security basics

Secure workload identities with the same Zero Trust instincts you use for privileged users—verify explicitly, least privilege, assume breach:

ControlPractice
Least privilegePrefer custom Azure roles and minimal Graph application permissions
Credential hygieneCertificates or federation; no eternal secrets; vault private keys
SeparationDifferent SPs for dev/test/prod and for different blast radii
MonitoringService principal sign-in logs; alert on new credentials or unusual clients
GovernanceOwners, access reviews, inventory automation
No user impersonationDo not share human passwords with robots
Disable when unusedTurn off enterprise app sign-in; remove RBAC
Managed identity firstIf Azure-hosted and supported, prefer MI over custom SP secrets

Risky workload identities (Identity Protection capabilities, where available) extend risk detection beyond human users—pair that awareness with the Identity Protection chapter content for complete Domain 2/3 linkage.

Comparison recap: MI versus SP versus user

QuestionManaged identityService principal (custom app)User account
Azure-hosted Azure-to-Azure?BestPossible but often unnecessaryWrong
GitHub → Azure deploy?Via federation to app/MI patternsCommon (federation preferred)Wrong
Multi-tenant SaaS?Not the modelRequired app + per-tenant SPWrong for the app identity
Who rotates auth material?AzureYou (or federation)Human password/MFA lifecycle
Admin center homeAzure resource + Entra MI viewsApp registrations + Enterprise appsUsers blade

Exam traps

  • Calling the app registration the thing you assign to a subscription IAM role—you assign the service principal object.
  • Believing a client secret is “more secure” than a certificate because it is simpler.
  • Using delegated permissions for a pure daemon with no user (will fail or be the wrong model).
  • Leaving Application.ReadWrite.All-style permissions on a build agent SP “for convenience.”
  • Forgetting that deleting an app registration impacts every credential and SP relationship for that app definition.

Closing Domain 3 entry skills

/study-guides/azure-sc-300Free exam prep with practice questions & AI tutor
Test Your Knowledge

In Microsoft Entra ID, what is a service principal relative to an app registration?

A
B
C
D
Test Your Knowledge

A DevOps team must authenticate GitHub Actions to Azure. Which credential approach best matches modern SC-300 security guidance?

A
B
C
D
Test Your Knowledge

Which administrative surface is primarily used to assign users/groups to an application instance and review its enterprise-app properties in a tenant?

A
B
C
D
Test Your Knowledge

Which practice is part of foundational workload identity security for service principals?

A
B
C
D