πŸ”’ Guided

Pre-launch preview. Authorised access only.

Incorrect code

Guided by A Guide to Cloud
Explore AB-900 AI-901
Guided SC-300 Domain 3
Domain 3 β€” Module 1 of 6 17%
16 of 27 overall

SC-300 Study Guide

Domain 1: Implement and Manage User Identities

  • Your Entra Tenant: Branding, Settings & Domains
  • Entra Roles & Administrative Units
  • Managing Users & Groups
  • Device Registration & Licensing
  • External Identities: Guest Access & B2B
  • Cross-Tenant Access & Synchronisation
  • Hybrid Identity: Connect Sync vs Cloud Sync
  • Hybrid Authentication: PHS, PTA & Seamless SSO

Domain 2: Implement Authentication and Access Management

  • Authentication Methods: Plan & Implement
  • Passwordless & Windows Hello for Business
  • MFA, SSPR & Password Protection
  • Conditional Access: Plan & Build Policies
  • Conditional Access: Advanced Controls & Troubleshooting
  • Entra ID Protection: Risk-Based Security
  • Global Secure Access: Zero Trust Networking

Domain 3: Plan and Implement Workload Identities

  • Workload Identities: Managed Identities & Service Principals
  • Enterprise Apps: SSO, App Proxy & Integration
  • Enterprise Apps: Users, Consent & Collections
  • App Registrations: Build & Secure
  • Defender for Cloud Apps: Discover & Control
  • Defender for Cloud Apps: Policies & OAuth Governance

Domain 4: Plan and Automate Identity Governance

  • Entitlement Management: Catalogs & Access Packages Free
  • Access Requests, Terms of Use & External Lifecycle Free
  • Access Reviews: Plan, Create & Monitor Free
  • PIM: Protect Your Privileged Roles Free
  • PIM: Azure Resources, Groups & Audit Free
  • Identity Monitoring: Logs, KQL & Secure Score Free

SC-300 Study Guide

Domain 1: Implement and Manage User Identities

  • Your Entra Tenant: Branding, Settings & Domains
  • Entra Roles & Administrative Units
  • Managing Users & Groups
  • Device Registration & Licensing
  • External Identities: Guest Access & B2B
  • Cross-Tenant Access & Synchronisation
  • Hybrid Identity: Connect Sync vs Cloud Sync
  • Hybrid Authentication: PHS, PTA & Seamless SSO

Domain 2: Implement Authentication and Access Management

  • Authentication Methods: Plan & Implement
  • Passwordless & Windows Hello for Business
  • MFA, SSPR & Password Protection
  • Conditional Access: Plan & Build Policies
  • Conditional Access: Advanced Controls & Troubleshooting
  • Entra ID Protection: Risk-Based Security
  • Global Secure Access: Zero Trust Networking

Domain 3: Plan and Implement Workload Identities

  • Workload Identities: Managed Identities & Service Principals
  • Enterprise Apps: SSO, App Proxy & Integration
  • Enterprise Apps: Users, Consent & Collections
  • App Registrations: Build & Secure
  • Defender for Cloud Apps: Discover & Control
  • Defender for Cloud Apps: Policies & OAuth Governance

Domain 4: Plan and Automate Identity Governance

  • Entitlement Management: Catalogs & Access Packages Free
  • Access Requests, Terms of Use & External Lifecycle Free
  • Access Reviews: Plan, Create & Monitor Free
  • PIM: Protect Your Privileged Roles Free
  • PIM: Azure Resources, Groups & Audit Free
  • Identity Monitoring: Logs, KQL & Secure Score Free
Domain 3: Plan and Implement Workload Identities Premium ⏱ ~13 min read

Workload Identities: Managed Identities & Service Principals

Choose the right identity for your workloads β€” managed identities, service principals, and when to use each one to securely connect Azure resources without storing credentials.

What are workload identities?

β˜• Simple explanation

Workload identities are ID badges for your apps and services β€” not for people.

Imagine a hotel. Guests (users) check in at the front desk and get a room key. But the housekeeping robot that delivers towels also needs a key to move between floors. You wouldn’t give the robot a guest room β€” you’d give it a special staff pass that only opens the doors it needs.

Workload identities are those staff passes. They let your applications, scripts, and automation prove who they are and access only the resources they’re allowed to touch β€” without anyone typing in a password.

A workload identity is an identity assigned to a software workload (application, service, script, or container) so it can authenticate and access other resources. In Microsoft Entra ID, workload identities include managed identities, service principals, and app registrations.

Unlike user identities that authenticate interactively, workload identities authenticate programmatically using certificates, secrets, or federated credentials. The key goal is eliminating hard-coded credentials β€” a major security risk that leads to breaches when secrets leak into source code or config files.

Types of workload identities

Not every workload needs the same type of identity. Here’s the decision framework:

Identity TypeBest ForCredentials
Managed identityAzure resources talking to other Azure resourcesNone β€” Azure handles it automatically
Service principalNon-Azure apps, multi-tenant apps, CI/CD pipelinesCertificate or client secret
User accountNever recommended for workloads (but sometimes inherited)Password β€” risky for automation
Managed service accountOn-premises services (Active Directory)Password managed by AD automatically
FeatureManaged IdentityService PrincipalUser Account
Credential managementAutomatic (Azure)Manual (you rotate)Manual (you rotate)
Works outside AzureNoYesYes
Can be shared across resourcesUser-assigned: YesYesYes (bad practice)
Appears in Entra IDAs enterprise appAs enterprise appAs user object
Supports Conditional AccessLimitedYesYes
Risk of credential leakNoneMediumHigh
Exam recommendationPreferred for AzureWhen managed identity isn't possibleNever for workloads
πŸ’‘ Exam tip: The golden rule

The SC-300 exam strongly favours managed identities whenever the workload runs on Azure. If a question asks about an Azure VM, Azure Function, or App Service accessing a Key Vault or Storage Account, the answer is almost always β€œuse a managed identity.” Service principals are the fallback for non-Azure scenarios or multi-tenant apps.

Managed service accounts β€” the on-prem option

Managed service accounts (MSAs) and group managed service accounts (gMSAs) are Active Directory objects for on-premises services. They’re NOT Entra ID objects β€” they live in on-prem AD only.

TypeScopeManaged By
Managed service account (MSA)Single serverAD auto-rotates the password
Group managed service account (gMSA)Multiple servers (clustered services)AD auto-rotates, all servers in the group use it

When the exam mentions managed service accounts: It’s testing whether you know these are on-premises AD identities, not cloud identities. If the workload runs in Azure β†’ managed identity. If the workload is an on-prem Windows service β†’ gMSA. Don’t confuse the two.

Managed identities β€” deep dive

A managed identity is a special type of service principal that Azure manages for you. You never see or handle its credentials β€” Azure rotates them automatically behind the scenes.

System-assigned vs user-assigned

FeatureSystem-AssignedUser-Assigned
Created withThe Azure resource (e.g., VM)Independently as a standalone resource
LifecycleTied to the resource β€” deleted when resource is deletedIndependent β€” persists until you delete it
SharingOne identity per resourceOne identity across multiple resources
Use caseSingle resource needs access to one or two servicesMultiple resources need the same permissions
Management overheadLower β€” automatic cleanupHigher β€” you manage the lifecycle
ℹ️ Scenario: Ravi chooses the right identity

πŸ’» Ravi Patel at NovaTech Solutions is deploying a new patient-data API on Azure App Service. The API needs to:

  1. Read secrets from Azure Key Vault
  2. Write logs to Azure Storage

Ravi considers his options:

  • User account? No β€” passwords would be in config files, violating compliance.
  • Service principal with a secret? Possible, but he’d need to rotate the secret every 6 months and store it somewhere secure (chicken-and-egg problem).
  • Managed identity? Yes β€” Azure handles credentials automatically, no secrets in code, no rotation headaches.

Ravi enables a system-assigned managed identity on the App Service because only this one API needs access. He then assigns the Key Vault Secrets User role and the Storage Blob Data Contributor role to the managed identity.

Result: Zero credentials in code. Zero rotation burden. Full audit trail in Entra ID.

Creating and assigning managed identities

Enable a system-assigned managed identity:

  1. Go to the Azure resource (e.g., App Service) β†’ Identity blade
  2. Under System assigned, toggle Status to On
  3. Click Save β€” Azure creates the identity and shows you the Object ID

Create a user-assigned managed identity:

  1. Go to Entra admin center β†’ Managed identities (or Azure portal β†’ search β€œManaged identities”)
  2. Click Create β†’ choose subscription, resource group, region, and name
  3. After creation, go to the Azure resource β†’ Identity β†’ User assigned tab
  4. Click Add β†’ select the managed identity

Grant access to a target resource (RBAC):

  1. Go to the target resource (e.g., Key Vault)
  2. Access control (IAM) β†’ Add role assignment
  3. Select the role (e.g., Key Vault Secrets User)
  4. Under Members, choose Managed identity β†’ select your identity
  5. Save
ℹ️ Scenario: Priya uses user-assigned for shared access

πŸ” Priya Sharma at Meridian Health has 12 Azure Functions that all need to read from the same Storage Account containing medical imaging data. Instead of enabling 12 separate system-assigned identities and granting each one access, Priya:

  1. Creates one user-assigned managed identity called mi-imaging-reader
  2. Assigns the Storage Blob Data Reader role to mi-imaging-reader on the Storage Account
  3. Attaches mi-imaging-reader to all 12 Azure Functions

Result: One identity, one role assignment, 12 functions. When a new function is added, Priya just attaches the same identity β€” no new role assignments needed.

Using a managed identity in code

When your app runs on an Azure resource with a managed identity enabled, it can request tokens from the Azure Instance Metadata Service (IMDS) without any credentials:

# Python example using Azure SDK
from azure.identity import DefaultAzureCredential
from azure.keyvault.secrets import SecretClient

credential = DefaultAzureCredential()
client = SecretClient(vault_url="https://my-vault.vault.azure.net", credential=credential)
secret = client.get_secret("api-key")

The DefaultAzureCredential class automatically detects the managed identity β€” no connection strings, no passwords, no environment variables with secrets.

πŸ’‘ Exam tip: DefaultAzureCredential chain

DefaultAzureCredential tries multiple authentication methods in order: environment variables β†’ managed identity β†’ Visual Studio β†’ Azure CLI β†’ interactive browser. On an Azure resource, it picks up the managed identity automatically. This is the recommended approach in Microsoft documentation and likely appears in exam scenarios.

Service principals β€” when managed identity isn’t enough

A service principal is the local representation of an application in your tenant. When you register an app in Entra ID or consent to a third-party app, a service principal is created automatically.

When you need a service principal instead of a managed identity:

  • Your workload runs outside Azure (on-premises server, AWS, GCP)
  • You need a multi-tenant application identity
  • Your CI/CD pipeline (GitHub Actions, Azure DevOps) needs to deploy Azure resources
  • You need workload identity federation (trust a token from an external identity provider without secrets)
ℹ️ Scenario: Ravi sets up CI/CD with workload identity federation

πŸ’» Ravi needs GitHub Actions to deploy code to Azure. Instead of storing a client secret in GitHub:

  1. He creates an app registration in Entra ID
  2. Adds a federated credential that trusts tokens from GitHub’s OIDC provider
  3. Configures the GitHub Actions workflow to request a token and exchange it for an Azure access token

Result: No secrets stored in GitHub. The federation trust means GitHub proves its identity via OIDC, and Entra ID issues a short-lived token. This is Microsoft’s recommended approach for CI/CD pipelines.

Workload identity security

Workload identities are increasingly targeted by attackers because they often have broad permissions and are less monitored than user identities.

Best practices:

  • Use managed identities wherever possible (zero credential risk)
  • Apply least-privilege RBAC β€” don’t give a managed identity Contributor when Reader suffices
  • Set short expiry on service principal secrets and certificates (Microsoft recommends certificates over secrets)
  • Use Conditional Access for workload identities (requires Workload Identities Premium licence) to restrict sign-ins by location or risk
  • Monitor with Entra ID Protection β€” it can detect anomalous sign-in behaviour for service principals

🎬 Video walkthrough

🎬 Video coming soon

Workload Identities β€” SC-300 Module 16

Workload Identities β€” SC-300 Module 16

~12 min

Flashcards

Question

What is a managed identity in Entra ID?

Click or press Enter to reveal answer

Answer

A type of service principal that Azure manages automatically. It provides an identity for Azure resources to authenticate to other services without storing credentials in code. Azure handles credential creation and rotation.

Click to flip back

Question

What is the difference between system-assigned and user-assigned managed identities?

Click or press Enter to reveal answer

Answer

System-assigned: created with and tied to a single Azure resource β€” deleted when the resource is deleted. User-assigned: created as a standalone resource, can be shared across multiple Azure resources, and has an independent lifecycle.

Click to flip back

Question

When should you use a service principal instead of a managed identity?

Click or press Enter to reveal answer

Answer

When the workload runs outside Azure (on-premises, AWS, GCP), when you need multi-tenant app identity, for CI/CD pipelines, or when you need workload identity federation with an external identity provider.

Click to flip back

Question

What is workload identity federation?

Click or press Enter to reveal answer

Answer

A method that lets an external identity provider (like GitHub or Google Cloud) exchange its token for an Entra ID access token β€” eliminating the need to store secrets. It uses an OIDC trust relationship configured as a federated credential on an app registration.

Click to flip back

Knowledge Check

Knowledge Check

Ravi at NovaTech is deploying an Azure Function that needs to read secrets from Azure Key Vault. The function runs entirely in Azure. What identity type should Ravi use?

Knowledge Check

Priya has 8 Azure Web Apps that all need read access to the same Azure SQL Database. She wants to minimise the number of role assignments. What should she do?

Knowledge Check

Ravi needs GitHub Actions to deploy infrastructure to Azure. His security team prohibits storing any long-lived secrets in GitHub. What should Ravi configure?


Next up: Enterprise Apps: SSO, App Proxy & Integration β€” how to connect SaaS applications and on-premises apps to Entra ID for single sign-on and secure remote access.

← Previous

Global Secure Access: Zero Trust Networking

Next β†’

Enterprise Apps: SSO, App Proxy & Integration

Guided

I learn, I simplify, I share.

A Guide to Cloud YouTube Feedback

© 2026 Sutheesh. All rights reserved.

Guided is an independent study resource and is not affiliated with, endorsed by, or officially connected to Microsoft. Microsoft, Azure, and related trademarks are property of Microsoft Corporation. Always verify information against Microsoft Learn.