Designing Authorization and Application Identity: RBAC, PIM, Managed Identities, App Registrations and OAuth Flows

Microsoft Azure Architect Design AZ 301 55 min min read Updated: Nov 17, 2026 Intermediate
Designing Authorization and Application Identity: RBAC, PIM, Managed Identities, App Registrations and OAuth Flows
Intermediate Topic 2 of 3

RBAC Design Rules

  • Assign roles to groups, not people
  • Assign at the lowest scope that works (resource group before subscription)
  • Prefer built-in roles. Create custom roles only for real gaps
  • Separate duties: operators, developers, security, finance readers
  • Keep Owner and User Access Administrator assignments very few
RoleCan do
OwnerEverything, including granting access
ContributorManage resources, cannot grant access
ReaderView only
User Access AdministratorManage access only
Specific rolesStorage Blob Data Reader, Key Vault Secrets User, Virtual Machine Contributor and many more

Privileged Access Design

ControlPurpose
PIM (Privileged Identity Management)Eligible, time-limited, approval-based elevation for Entra and Azure roles
Access reviewsRegularly recertify who still needs access
Break-glass accountsTwo emergency cloud-only accounts excluded from risky policies, strongly protected and monitored
Privileged access workstationsDedicated devices for admins
Administrative unitsDelegate user management for a part of the directory

Application Identity Options

OptionUse
System-assigned managed identityOne Azure resource, lifecycle tied to it
User-assigned managed identityShared by many resources, reusable permissions
App registration + service principalApps outside Azure, multi-tenant apps, sign-in for users
Workload identity federationGitHub Actions, Kubernetes and other external workloads with no secrets
Rule If the code runs in Azure and the target supports Entra ID, use a managed identity. Avoid client secrets and passwords.

OAuth 2.0 and OpenID Connect in One Page

FlowUse
Authorization code (with PKCE)Web apps, SPAs and mobile sign-in of users
Client credentialsDaemon or service calling an API with its own identity
On-behalf-ofAPI calls another API as the signed-in user
Device codeDevices without a browser
  • OpenID Connect proves who the user is (ID token). OAuth 2.0 authorizes access to an API (access token)
  • Use scopes and app roles to limit what a token allows
  • Use Microsoft Authentication Library (MSAL), do not write your own protocol code

Design Example

A web app with an API and a database: users sign in via authorization code flow with Conditional Access. The API validates the token and uses managed identity to read Key Vault and access SQL. Admins get PIM-eligible roles.

Practice

  1. Choose roles for a developer team that deploys web apps but must not manage networking
  2. Replace a stored database password with a managed identity design
  3. Choose the OAuth flow for a nightly background job

Conclusion

Design authorization with group-based least-privilege RBAC, PIM for elevation, managed or federated identities for apps and standard OAuth and OpenID Connect flows.

Quick Summary: RBAC; privileged access; app identities; OAuth; example.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators