Study guide

9.2 Create, Assign & Use Managed Identities

Exam SC-300: Microsoft Identity and Access Administrator Exam

Track your progress as you read

Finished sections get a check mark.

1 Introduction & Exam Overview

1.1 Current Exam Facts & Logistics 1.2 Audience Profile, Zero Trust & Role Scope 1.3 Skills Measured & Study Map

2 Entra Tenant Administration

2.1 Tenant Properties, Domains & Company Branding 2.2 Built-in & Custom Roles, Effective Permissions 2.3 Administrative Units

3 Users, Groups, Licenses & Devices

3.1 Create, Configure & Manage Users 3.2 Groups & Custom Security Attributes 3.3 Licenses, Bulk Operations & Device Join

4 External Identities & Cross-Tenant Access

4.1 External Collaboration & Guest Lifecycle 4.2 Cross-Tenant Access Settings 4.3 Cross-Tenant Sync & External Identity Providers

5 Hybrid Identity

5.1 Entra Connect Sync vs Cloud Sync 5.2 PHS, PTA & Seamless SSO 5.3 AD FS Migration & Connect Health

6 Authentication Methods & MFA

6.1 Authentication Methods Portfolio 6.2 MFA, SSPR & Password Protection 6.3 Passwordless, Session Control & Entra Kerberos

7 Conditional Access

7.1 Planning, Assignments & Controls 7.2 Session Management, Device Restrictions & CAE 7.3 Auth Context, Protected Actions, Templates & Troubleshooting

8 Identity Protection & Global Secure Access

8.1 User Risk & Sign-in Risk 8.2 MFA Registration Campaigns & Risky Workloads 8.3 Global Secure Access

9 Workload & Managed Identities

9.1 Selecting Identities for Apps & Azure Workloads 9.2 Create, Assign & Use Managed Identities 9.3 Service Principals Fundamentals

10 Enterprise Apps & App Registrations

10.1 Enterprise Applications Integration 10.2 App Registrations, API Permissions & App Roles 10.3 Application Proxy & Consent

11 Microsoft Defender for Cloud Apps

11.1 Cloud Discovery & Connected Apps 11.2 CA App Control & Session Policies 11.3 OAuth App Policies & Catalog Management

12 Entitlement Management

12.1 Catalogs & Access Packages 12.2 Access Requests & Terms of Use 12.3 Connected Organizations & External User Lifecycle

13 Access Reviews

13.1 Plan & Create Access Reviews 13.2 Monitor & Respond to Access Reviews

14 Privileged Identity Management

14.1 PIM for Entra Roles & Azure Resources 14.2 PIM for Groups, Approval & Audit 14.3 Break-Glass (Emergency Access) Accounts

15 Monitoring, Logs & Secure Score

15.1 Sign-in, Audit & Provisioning Logs 15.2 Diagnostics, KQL & Workbooks 15.3 Identity Secure Score

9.2 Create, Assign & Use Managed Identities

Key Takeaways Explain This Topic AI

System-assigned managed identities are created with a single Azure resource, share its lifecycle, and cannot be shared with other resources.

User-assigned managed identities are independent Azure resources you create first, then assign to one or more supported Azure resources.

Workloads obtain tokens from the Azure Instance Metadata Service (or platform equivalent); applications use those tokens as bearer tokens to Azure Resource Manager or data-plane APIs.

Authorize managed identities with Azure RBAC (and Key Vault RBAC or access policies) on target resources—there is no password to place in configuration for the identity itself.

The core security benefit is elimination of developer-managed credentials for Azure-to-Azure authentication; you still apply least privilege and monitor workload sign-ins.

Last updated: July 2026

Managed identities in operational depth

Section 9.1 chose managed identity as the default for many Azure workloads. Section 9.2 is the how : create, assign, grant data access, and understand what “no credentials to manage” really means on SC-300.

A managed identity is an Entra service principal that Azure provisions and rotates. Your resource gets an identity; Azure RBAC (and similar) decide what that identity can do. Code asks Azure for a token; Azure hands back an access token for a resource audience such as Key Vault or Storage.

Practice scenarios: /practice/azure-sc-300 . Guide home: /study-guides/azure-sc-300 .

System-assigned versus user-assigned

  • Attribute System-assigned User-assigned
  • Creation Enabled on a specific Azure resource Created as its own Azure resource first
  • Lifecycle Deleted when the host resource is deleted Independent; survives host deletion until you delete it
  • Sharing One-to-one with the host Many hosts can share one identity
  • Portal mental model “Identity blade on the VM/App Service” “Managed Identity resource in a resource group”

Typical use Single app with its own permissions Common permissions for a fleet; pre-stage identity before compute

RBAC assignments On the system-assigned principal of that resource On the user-assigned principal; shared by all assignees

Exam cue: if the stem says the identity must remain when a VM is rebuilt, or must be shared by several web apps, choose user-assigned . If the stem says a single Logic App needs its own identity that should disappear with the app, system-assigned is enough.

Both types appear in Microsoft Entra ID as service principals (enterprise applications / managed identities views). You still manage authorization the same way: role assignments on target resources.

Create a system-assigned managed identity

High-level admin steps (UI labels evolve; exam cares about the model):

Open the Azure resource (for example Virtual machine , App Service , Function App , Azure Automation account ).

Open Identity (or equivalent).

Under System assigned , set Status to On , save.

Azure creates an Entra identity tied to that resource and shows an Object (principal) ID .

Use that principal when assigning Azure roles on targets.

CLI conceptual pattern (know the intent, not trivia flags):

Enable system-assigned identity on the resource.

Note principalId .

role assignment create for that principal on the scope of Storage, Key Vault, SQL, etc.

ARM/Bicep/Terraform can set identity: { type: 'SystemAssigned' } so identity is part of infrastructure as code—a common enterprise pattern SC-300 recognizes as good operations hygiene.

Create and assign a user-assigned managed identity

Create a user-assigned managed identity in a resource group (name, region).

Note its client ID , principal ID , and resource ID .

On each compute resource, open Identity > User assigned > Add , select the managed identity.

Grant Azure RBAC on target resources to the user-assigned principal (once), not once per app unless scopes differ.

In application configuration, when multiple identities exist on one host, specify which user-assigned identity to use (client ID) so token requests are unambiguous.

  • Step System-assigned User-assigned
  • Create identity object Implicit when enabled Explicit resource create
  • Attach to compute Same step as create Separate assign step
  • Choose identity in code Default system identity Often pass client ID
  • Delete compute Identity removed Identity remains

Multiple identities on one resource: an App Service can have system-assigned and several user-assigned identities. Default token requests may use system-assigned; libraries accept a managed identity client ID for user-assigned selection. Misconfiguration here is a frequent “token works in portal test but app gets 401” troubleshooting story.

  • Use managed identity to access Azure resources
  • Token acquisition (conceptual)

Supported Azure hosts expose a local endpoint (for VMs, the Instance Metadata Service at a link-local address) that issues access tokens for the managed identity after Azure validates the caller is that resource. Application code typically uses Azure Identity SDK classes such as DefaultAzureCredential / ManagedIdentityCredential rather than raw HTTP, but SC-300 wants the security model :

No client secret in appsettings.json for the MI itself.

Token is short-lived; Azure rotates underlying credentials.

Token audience must match the target API (for example Key Vault, Storage, Arm).

Azure RBAC on the target

Authentication (who you are) is the managed identity. Authorization is still required:

Target Example roles / controls

Azure Storage (data plane) Storage Blob Data Reader / Contributor; Storage Queue Data *; not only “Reader” on the control plane

  • Key Vault Key Vault Secrets User (RBAC model) or get/list secret permissions (access policy model)
  • Azure SQL Entra admin set; create contained user for the MI; grant DB roles
  • Microsoft Graph Application permissions on the MI’s service principal + admin consent where supported
  • Azure Resource Manager Contributor/Reader on resource group or finer custom roles

Classic exam trap: assigning Reader on the Storage account resource allows seeing the account in Azure Resource Manager but does not grant permission to read blob bytes. Data-plane roles are required for many Storage and Key Vault scenarios.

Key Vault pattern (high yield)

Enable MI on App Service / Function / VM.

On Key Vault, enable Azure RBAC authorization (modern) or access policies (legacy).

Assign Key Vault Secrets User (or narrower custom role) to the MI principal at vault or secret scope.

App uses Azure SDK with managed identity to call GetSecret .

Network rules / private endpoints may still block access even with correct RBAC—identity and network are both required in locked-down designs.

Storage pattern (high yield)

Enable MI on the compute resource.

Assign Storage Blob Data Contributor (or Reader) to the MI on the storage account or container scope.

Use Azure.Storage libraries with token credential from managed identity.

Avoid connection strings with account keys when Entra auth is available—keys are secrets you must rotate and protect; MI removes that class of secret for Azure-native access.

“No credential management” — what it does and does not mean

Does mean:

You do not create a client secret for the managed identity.

You do not put MI passwords in Key Vault (there is no MI password for you to store).

Azure handles credential issuance and rotation for the identity.

Does not mean:

You skip RBAC —without roles, tokens still fail authorization.

Third-party APIs stop needing their API keys—store those in Key Vault and let MI read Key Vault.

Every language host auto-authenticates without code changes—you still use SDKs/endpoints correctly.

Compromise is impossible—if an attacker runs code on the resource, they can request tokens as the MI. Harden the host, use least privilege, and monitor.

  • Benefit Residual duty
  • No client secret for Azure auth Least-privilege RBAC
  • Auto rotation Monitor sign-in logs for the SP
  • Lifecycle with resource (system-assigned) Clean up user-assigned identities you no longer need
  • Cleaner secret scanning results Still secure app config for non-Azure secrets
  • Administration, governance, and troubleshooting cues

Where to look in portals:

Azure resource Identity blade — enable/assign.

Subscriptions / resource groups / resources → Access control (IAM) — role assignments for the MI.

Microsoft Entra admin center — enterprise applications / managed identities list for the service principal object.

Sign-in logs filtered to service principal / managed identity activity when diagnosing auth failures.

Common failure modes:

  • Symptom Likely cause
  • 401/403 from Storage/Key Vault Missing data-plane RBAC or wrong scope
  • Works for user in portal, fails for app App not using MI credential; still using expired secret
  • Wrong permissions after sharing identity User-assigned MI over-privileged for some of the apps sharing it
  • Token for wrong identity Multiple MIs on host; client ID not specified
  • MI missing after recreate System-assigned deleted with resource; role assignments orphaned

Infrastructure as code tip: when using system-assigned, role assignments often depend on the principal ID emitted after deployment—order modules so identity exists before RBAC. User-assigned can be created in a platform landing zone first, simplifying app team deployments.

SC-300 scenario drill

“Enable the web app to read secrets without storing secrets in config” → system- or user-assigned MI + Key Vault Secrets User.

“Rebuild VMs monthly but keep the same role assignments” → user-assigned MI attached to each new VM.

“Developer wants to paste a client secret into Function app settings for Azure SQL” → prefer MI + Entra auth to SQL instead.

“Security asks who can create user-assigned identities” → control with Azure RBAC on the subscription/resource group (Managed Identity Contributor patterns) and landing-zone policy.

Master create/assign/use, then move to service principal fundamentals for non-Azure and app-registration-centric workloads in section 9.3. Enterprise apps and app registrations expand further in the next chapter of /study-guides/azure-sc-300 .