Showing posts with label ZeroTrust. Show all posts
Showing posts with label ZeroTrust. Show all posts

Wednesday, May 6, 2026

Microsoft Entra ID (Azure Active Directory) Complete Guide

Microsoft Entra ID (Azure Active Directory) — Complete Guide

Identity Management · Authentication · Conditional Access · PIM · Hybrid Identity · B2B · Zero Trust · Scenarios · Cheat Sheet


Table of Contents

  1. Core Concepts — Basics
  2. Identity & Authentication
  3. Access Control & RBAC
  4. Identity Protection & Conditional Access
  5. Hybrid Identity & B2B
  6. Privileged Identity Management (PIM)
  7. Scenario-Based Questions
  8. Cheat Sheet — Quick Reference

1. Core Concepts — Basics

What is Microsoft Entra ID and how does it differ from Active Directory?

Microsoft Entra ID (formerly Azure Active Directory / Azure AD) is Microsoft's cloud-based Identity and Access Management (IAM) service. It is NOT Active Directory moved to the cloud — it is a fundamentally different identity platform.

Active Directory Domain Services (AD DS) — on-premises:
→ Protocol: Kerberos, NTLM, LDAP
→ Structure: forests, domains, OUs, GPOs
→ Objects: computers, printers, users, groups
→ Authentication: Kerberos tickets to domain-joined machines
→ Use: corporate network, on-prem apps, file shares
→ Management: AD Users & Computers, Group Policy

Microsoft Entra ID — cloud:
→ Protocol: OAuth 2.0, OpenID Connect, SAML 2.0
→ Structure: tenant (flat — no OUs, no GPOs, no forests)
→ Objects: users, groups, service principals, managed identities, devices
→ Authentication: JWT access tokens, refresh tokens
→ Use: cloud apps, SaaS (M365, Salesforce), external users
→ Management: Azure Portal, Graph API, PowerShell

Key distinctions:
→ No Kerberos or NTLM in Entra ID
→ No Organisational Units (OUs) — flat directory
→ No Group Policy Objects (GPOs) — use Intune/Conditional Access
→ Manages internet-facing identities, not domain-joined machines

Tip: The most common mistake is confusing Entra ID with AD DS. They coexist — Entra Connect synchronises identities from AD DS to Entra ID for hybrid environments.


What is a Microsoft Entra ID tenant and its key components?

A tenant is a dedicated, isolated instance of Entra ID representing one organisation. Created when signing up for M365 or Azure. Has a unique tenant ID (GUID) and primary domain (contoso.onmicrosoft.com).

Component Description
Users Member users (employees) and guest users (B2B externals)
Groups Security groups, M365 Groups, Distribution groups
App Registrations Your apps calling Graph/APIs — developer-owned definitions
Enterprise Applications SaaS apps + service principals (runtime instances)
Service Principals Identity of an application within a specific tenant
Managed Identities System or user-assigned identity for Azure resources
Devices Entra registered, Entra joined, or Hybrid Entra joined

Tip: Tenant ID = the organisation's Entra directory. Application (Client) ID = the app registration. Object ID = unique identifier of any directory object. Know all three.


What are the Entra ID licence tiers?

Entra ID Free (included with Azure/M365):
→ User/group management, SSO for 10 apps per user
→ Basic MFA for admins, self-service password reset (cloud only)
→ Entra Connect sync from AD DS

Entra ID P1 (M365 E3 / EMS E3):
→ All Free features +
→ Full Conditional Access policies
→ Hybrid identity (with password writeback)
→ Identity Protection (sign-in risk detection)
→ Dynamic groups
→ Application Proxy (publish on-prem apps)
→ Self-service password reset with on-prem writeback

Entra ID P2 (M365 E5 / EMS E5):
→ All P1 features +
→ Privileged Identity Management (PIM)
→ Identity Protection (user risk policies)
→ Access Reviews
→ Entitlement Management

Critical licensing facts:
Full Conditional Access  → P1 minimum
PIM                      → P2 required
User risk policies        → P2 required
Access Reviews           → P2 required
Dynamic groups           → P1 required

2. Identity & Authentication

What authentication methods does Entra ID support?

Method Phishing Resistant Notes
FIDO2 security keys Yes Highest security — YubiKey, hardware tokens
Windows Hello for Business Yes Biometric/PIN tied to device TPM — passwordless
Certificate-based auth Yes X.509 certificates, smart cards
Microsoft Authenticator (push) Yes (with number matching) Most practical MFA method
OATH TOTP tokens No Authenticator app TOTP codes
Temporary Access Pass (TAP) N/A Time-limited passcode for bootstrapping/recovery
SMS / Voice call OTP No Vulnerable to SIM swap — not recommended
Password No Weakest — being phased out as primary auth

Tip: Microsoft's recommended path: Password → Authenticator with number matching → FIDO2/Windows Hello → passwordless. Always move away from SMS — SIM swap attacks make it unreliable.


What is SSO in Entra ID and what protocols does it use?

SSO allows users to authenticate once with Entra ID and access multiple applications without re-entering credentials.

SSO protocols:

OpenID Connect (OIDC):
→ Modern, built on OAuth 2.0
→ Returns ID token (JWT) with user claims
→ Best for: modern web/mobile apps, custom apps, M365 integrations

SAML 2.0:
→ XML-based enterprise federation standard
→ Returns SAML assertion with user attributes
→ Best for: enterprise SaaS apps (Salesforce, ServiceNow, SAP, Workday)

Password-based SSO:
→ Entra ID stores/injects credentials into apps
→ For legacy apps with no federation support
→ Requires browser extension

App Proxy SSO (on-prem apps):
→ Publish on-prem web apps through Entra ID App Proxy
→ User authenticates to Entra ID → App Proxy forwards to on-prem
→ Supports: Kerberos Constrained Delegation, header-based

OIDC SSO flow:
1. User accesses app → redirect to login.microsoftonline.com
2. Authenticates (MFA if CA requires it)
3. Entra ID issues ID token + access token
4. Tokens returned to app → user logged in
5. Subsequent apps: silent token reuse (no re-login)

What is the difference between App Registration and Enterprise Application?

App Registration: global definition of your application in the developer's home tenant. Defines: application ID, redirect URIs, API permissions, client secrets/certificates, exposed API scopes.

Enterprise Application (Service Principal): local instance of an application within a specific tenant. Created when an app is consented to. Controls: who can access, SSO settings, provisioning, Conditional Access assignment.

Relationship:
App Registration (global, developer's home tenant)
  → When consented in same tenant: creates Service Principal (Enterprise App)
  → When consented in another tenant: creates Service Principal there too

Multi-tenant app:
App Registration in Tenant A (developer)
  → Service Principal in Tenant A (same tenant use)
  → Service Principal in Tenant B (Tenant B admin consents)
  → Service Principal in Tenant C (Tenant C admin consents)

Gallery SaaS apps (Salesforce, Workday):
→ Enterprise Application (Service Principal) in your tenant
→ No App Registration (owned by the ISV)

Tip: App Registration = APPLICATION definition (developer-owned). Service Principal = APPLICATION INSTANCE in a tenant (runtime identity). One app registration → many service principals across tenants.


What is a Managed Identity?

Managed Identity is an automatically managed Azure identity for Azure resources — no credentials to manage.

Types:
System-assigned: created when enabled on a resource (VM, Function App, Logic App)
                 tied to resource lifecycle — deleted when resource deleted
                 one-to-one with the resource

User-assigned:   standalone Azure resource
                 assigned to multiple Azure resources
                 independent lifecycle
                 use when multiple resources share the same identity

Why prefer Managed Identity over Service Principal + secret:
Service Principal + secret:
→ Secret must be generated, stored, rotated, and kept secure
→ Rotation failure → app breaks
→ Secret can be leaked (committed to Git, exposed in logs)
→ Manual credential management overhead

Managed Identity:
→ No credentials to manage
→ No secret to rotate or leak
→ Azure IMDS issues tokens automatically to the resource
→ RBAC assignments control what the identity can access

Code comparison:
// With client secret (requires management):
var credential = new ClientSecretCredential(tenantId, clientId, secret);

// With managed identity (zero credential management):
var credential = new DefaultAzureCredential();
// Uses managed identity in Azure, developer credentials locally

Tip: Managed Identity is the answer to any "how do you securely authenticate an Azure resource to another Azure service" question. Always recommend over service principal + secret.


3. Access Control & RBAC

What is Azure RBAC and how does it work?

Azure RBAC components:
Security principal: WHO gets access (User, Group, Service Principal, Managed Identity)
Role definition:    WHAT they can do (built-in or custom set of allowed actions)
Scope:              WHERE it applies (Management Group > Subscription > RG > Resource)
Role assignment:    WHO + WHAT + WHERE (combination of above three)

Scope hierarchy (parent roles inherited by children):
Management Group → Subscription → Resource Group → Resource

Key built-in roles:
Owner                    → full access + manage RBAC assignments
Contributor              → full resource management, CANNOT manage RBAC
Reader                   → read-only access to all resources
User Access Administrator → manage RBAC only, no resource access

Role inheritance example:
Subscription: Alice = Reader
  Resource Group A: Alice = Contributor (overrides subscription Reader)
    Resource 1: Alice inherits Contributor from RG A
    Resource 2: Alice inherits Contributor from RG A
  Resource Group B: Alice inherits Reader from Subscription

Tip: Owner = Contributor + ability to assign RBAC roles. Never give Owner to service accounts — use Contributor + specific additional roles only where needed.


What are Entra ID roles vs Azure RBAC roles?

Entra ID roles (directory roles):
→ Control operations on Entra ID directory itself
→ Examples: Global Administrator, User Administrator,
            Conditional Access Administrator, Security Reader,
            Application Administrator, Groups Administrator
→ Assigned via: Entra admin centre or PIM
→ Apply to: tenant-wide directory operations

Azure RBAC roles (resource roles):
→ Control operations on Azure resources
→ Examples: Owner, Contributor, Reader, Key Vault Secrets Officer,
            Storage Blob Data Contributor, Virtual Machine Operator
→ Assigned via: Azure Portal IAM blade, CLI, or Terraform
→ Apply to: management group / subscription / resource group / resource

CRITICAL: These are completely separate permission systems:
Global Admin ≠ Owner:
→ Global Admin can reset any user's password (directory operation)
→ Global Admin has NO Azure resource access by default
→ Azure Owner has NO Entra ID admin access by default

Exception (nuclear option):
Global Admin can ELEVATE themselves to User Access Administrator
on the root management group — gaining access to ALL Azure resources.
Use with extreme caution and audit trail.

What are dynamic groups?

Dynamic groups automatically manage membership based on rules evaluated against user or device attributes.

Dynamic user group rules:
user.department -eq "Finance"
user.jobTitle -contains "Manager"
user.country -eq "UK"
(user.department -eq "Finance") -or (user.department -eq "Accounting")

Dynamic device group rules:
device.deviceOSType -eq "Windows"
device.managementType -eq "MDM"
device.enrollmentProfileName -eq "Corporate"

Use cases:
→ Auto-assign M365 licences: "Sales" dept → Salesforce licence
→ Auto-apply Conditional Access: all contractors → restricted policy
→ Auto-provision SharePoint access by department
→ Auto-assign Intune device policies by OS type

Requirements: Entra ID P1 licence for dynamic user groups
Sync time: membership evaluated within 24 hours of attribute change

Tip: Dynamic groups eliminate manual membership management. When user joins Finance department, they automatically get all Finance group memberships — and all access those groups grant. Leaving removes access automatically.


What are Access Reviews?

Access Reviews (Entra ID P2) provide periodic automated reviews of access rights — ensuring users still need the access they have.

Review Type What Is Reviewed
Group membership Do members still need group membership?
Application access Do users still need access to an enterprise app?
Privileged roles Do admins still need their admin roles? (PIM integrated)
Guest users Do external guests still need access to the tenant?
Configuration:
Reviewers:    self / manager / specific users / group owners
Frequency:    one-time / weekly / monthly / quarterly / annually
Duration:     7, 14, or 30 days for reviewers to respond
On no response: auto-approve (lenient) or auto-deny (strict — recommended)
Apply results: automatically remove access when denied

Compliance value:
→ SOC 2 Type II: evidence of periodic access reviews
→ ISO 27001 A.9.2.5: user access reviews requirement
→ GDPR: evidence of regular personal data access review
→ Export review results as compliance audit evidence

4. Identity Protection & Conditional Access

What is Entra ID Identity Protection?

Identity Protection uses ML to detect suspicious sign-in patterns and compromised credentials, generating risk signals used by Conditional Access.

Sign-in risk (per authentication):
→ Anonymous IP address (Tor, VPN proxies)
→ Atypical travel (impossible travel — London then NY within 1 hour)
→ Malware-linked IP address
→ Unfamiliar sign-in properties (new device, location, browser)
→ Password spray attack detected
→ Token issuer anomaly

User risk (accumulates over time):
→ Leaked credentials (found in dark web breach dumps)
→ Azure AD threat intelligence (known attack patterns)
→ Anomalous user activity

Risk levels: Low / Medium / High / None

Conditional Access risk-based policies (P2 required):
Sign-in risk ≥ Medium → require MFA re-authentication
Sign-in risk = High   → block access
User risk = High      → require password change + MFA
User risk = Medium    → require MFA

Self-remediation:
→ User completes MFA → sign-in risk cleared (no admin needed)
→ User changes password → user risk cleared (no admin needed)

What is Conditional Access?

Conditional Access is the Entra ID policy engine evaluating signals and enforcing access decisions — the "if/then" engine of Zero Trust.

# Conditional Access policy structure:
WHEN (Assignments):
  Users:    All users / specific groups / guest users
  Apps:     All cloud apps / specific apps
  Conditions:
    Sign-in risk:    Low / Medium / High (Identity Protection)
    User risk:       Low / Medium / High (Identity Protection)
    Device platform: Windows / iOS / Android / macOS
    Location:        Named locations (trusted IPs / countries)
    Client apps:     Browser / Mobile apps / Legacy auth
    Device state:    Compliant / Hybrid joined / Unregistered

THEN (Grant controls):
  Block access
  OR Allow with:
    Require MFA
    Require device compliance (Intune)
    Require hybrid Entra join
    Require approved client app
    Require app protection policy

Session controls:
  Sign-in frequency:        re-auth every N hours
  Persistent browser:       No (close browser = sign out)
  App-enforced restrictions: browser-only on SharePoint

Key policies to implement:
1. Require MFA for ALL users (exclude break-glass accounts)
2. Block legacy authentication (HIGHEST IMPACT — single policy)
3. Require compliant device for Office 365
4. Browser-only for personal/unmanaged devices
5. Block access from high-risk sign-in locations
6. Risk-based: MFA on medium risk, block on high risk

What are Named Locations and Continuous Access Evaluation?

Named Locations:
→ Define trusted IP ranges (corporate office, VPN) or countries
→ Used in Conditional Access conditions
→ Types: IP ranges (CIDR notation) / Countries/Regions

Use cases:
→ Allow access without MFA from trusted corporate IPs
→ Block access from specific high-risk countries
→ Identity Protection: trusted IP sign-ins get lower risk signal
→ Exclude break-glass accounts: allow access from named trusted IPs

Sign-in frequency:
→ Forces re-authentication after specified period
→ Every 1 hour: high security apps (financial, HR)
→ Every 8 hours: standard business apps
→ Every 24 hours: moderate security apps
→ Never persistent: session ends on browser close (shared computers)

Continuous Access Evaluation (CAE):
→ Near real-time token revocation (not waiting for token expiry)
→ User disabled in Entra ID → token revoked within minutes
→ User location changes → session re-evaluated immediately
→ Supported by: Exchange Online, SharePoint, Teams, Azure services
→ Default token lifetime (1 hour) without CAE can leave compromised
  accounts active for up to 1 hour after disabling

What are break-glass accounts?

Break-glass accounts are emergency access accounts used only when all normal admin access paths fail.

Requirements:
→ Minimum 2 accounts (each a backup for the other)
→ Cloud-only (not synced from AD — immune to on-prem outages)
→ No MFA requirement (accessible even if MFA infrastructure fails)
→ 25+ character random passwords stored physically (safe or split custody)
→ No licences assigned (reduces attack surface)
→ Excluded from ALL Conditional Access policies
→ Monitored: alert on ANY sign-in (Azure Sentinel / Monitor alert)

Configuration:
→ Role: Global Administrator (permanent active, not eligible)
→ CA exclusion: add both accounts to exclusion group in all CA policies
→ Account type: use .onmicrosoft.com UPN (not custom domain — domain
  could become unavailable)
→ MFA: skip MFA requirement (but store in secure physical location)
→ Password: document in physical safe + rotate annually

Critical: If you lock yourself out without break-glass accounts, recovery requires contacting Microsoft Support — which can take hours. Break-glass accounts are mandatory for any production Entra ID tenant.


What is Entra ID Password Protection?

Components:
Global banned password list:
→ Microsoft maintains 100,000+ commonly breached passwords
→ Applied automatically to ALL Entra ID tenants
→ Not configurable — always enforced

Custom banned password list (P1/P2):
→ Admin adds org-specific terms (company name, product names, city)
→ Up to 1,000 custom entries
→ Variations auto-detected: ContosoW1nter2024! → matches "Contoso" + "Winter"

Smart lockout:
→ Locks account after N failed attempts (configurable threshold)
→ Distinguishes attacks from legitimate mistyping
→ Lockout duration increases exponentially
→ Cloud and on-prem lockout counters maintained separately

On-premises Password Protection:
→ Deploy DC Agent on ALL domain controllers
→ Enforces same banned password list for AD DS password changes
→ Extends cloud protection to on-prem AD
→ Critical for hybrid environments — commonly missed control

5. Hybrid Identity & B2B

What is Entra Connect and how does hybrid identity work?

Microsoft Entra Connect (formerly Azure AD Connect) synchronises identities from AD DS to Entra ID.

Authentication methods:

Password Hash Sync (PHS) — RECOMMENDED:
→ Hash of password hash synced to Entra ID
→ Authentication happens IN ENTRA ID (cloud)
→ Works even if on-prem is unavailable
→ Enables leaked credential detection (Identity Protection)
→ Simplest to deploy and maintain

Pass-Through Authentication (PTA):
→ Auth request forwarded to PTA agent on on-prem AD
→ Authentication happens AGAINST ON-PREM AD
→ Password never leaves on-prem
→ Requires on-prem infrastructure available during auth
→ Cannot detect leaked credentials (no password hash in cloud)
→ Use when: policy prohibits any password data in cloud

Federation (AD FS):
→ Full federation with on-prem AD FS or third-party IdP
→ Most complex, most expensive, most maintenance
→ Use when: smart cards, advanced on-prem auth scenarios
→ Microsoft recommends migrating away from AD FS

Writeback features:
Password writeback: password reset in cloud → writes back to AD DS
Group writeback:    M365 Groups written back to AD as distribution lists
Device writeback:   Entra ID device objects written back to AD

What is Entra ID B2B collaboration?

Entra ID B2B enables organisations to invite external users to collaborate using their own credentials — no separate accounts needed.

B2B invitation flow:
1. Admin/user invites: partner@fabrikam.com
2. Guest receives email invitation
3. Guest redeems → consent screen
4. Guest user object created in Contoso's Entra ID
   (userType = "Guest", UPN = partner_fabrikam.com#EXT#@contoso.onmicrosoft.com)
5. Guest accesses resources granted to them

Supported identity providers for guests:
→ Entra ID / Azure AD (partner has M365) → federated sign-in
→ Microsoft personal account
→ Google Workspace → Google federation
→ Email OTP: for users without any supported IdP

Cross-tenant access settings:
Inbound:  control what external tenants can access in YOUR tenant
Outbound: control what YOUR users can access in external tenants
Trust:    trust MFA claims from specific partner tenants
          (avoids double MFA prompt for trusted partners)

B2B vs B2C:
B2B: partner/vendor enterprise users — use their own org identities
     Managed in Entra ID as guest users
     Use case: partner project collaboration

B2C: consumer-facing apps — customers create local accounts or use
     social IdPs (Google, Facebook, Apple)
     Separate Azure AD B2C tenant (NOT your corporate Entra ID)
     Use case: customer-facing applications

What are Entra ID device join options?

Type Ownership AD DS Required Managed By SSO
Entra ID Registered Personal (BYOD) No Optional Intune Cloud apps only
Entra ID Joined Corporate No Intune recommended Cloud + on-prem (with PHS)
Hybrid Entra ID Joined Corporate Yes Intune or GPO Cloud + on-prem (Kerberos)

Tip: Hybrid Entra ID Joined = migration path for existing AD DS estates. New devices in cloud-first organisations should use Entra ID Joined — no AD DS required.


What is Entitlement Management?

Entitlement Management (P2 / Governance) automates access request, approval, assignment, and review for groups, apps, and SharePoint sites.

Key components:
Access packages: bundle of resources requestable by users
                 (groups + app roles + SharePoint sites)
Policies:        who can request, approval workflow, duration, expiry, reviews
Catalogs:        containers for access packages (HR catalog, IT catalog)
Connected orgs:  allow external B2B users to request access packages

Example: "Finance Analyst" access package
Resources:
  → Finance SharePoint site (Member)
  → Finance M365 Group (Member)
  → SAP Finance role (Viewer)

Policy:
  Requestable by: Finance department employees + approved external auditors
  Approval:       Finance manager approval required
  Duration:       90 days (auto-expires)
  Access review:  quarterly
  External users: allowed (connected organisations)

User journey:
1. User visits myaccess.microsoft.com
2. Requests "Finance Analyst" access package + justification
3. Manager approves/denies (email + Teams notification)
4. On approval: user gets all 3 resource accesses simultaneously
5. After 90 days: access expires automatically
6. Quarterly review: manager recertifies or access revoked

6. Privileged Identity Management (PIM)

What is PIM and how does it work?

PIM provides just-in-time (JIT) privileged access — elevated roles only when needed, for limited time, with approval and audit trail.

Role assignment types:
Eligible:  user CAN activate the role but is not currently active
Active:    role is live — user has elevated permissions now
Permanent: always active (break-glass accounts only)

JIT activation flow:
1. User requests role activation (selects role + duration + justification)
2. Approval notification sent to designated approvers
3. Approver approves/denies (with optional MFA requirement)
4. Role becomes Active for the specified duration
5. After duration: role auto-deactivates
6. Full audit trail: who activated, why, when, duration, approver

Without PIM:
Global Admin permanently assigned → compromised account =
attacker has Global Admin access 24/7

With PIM:
Global Admin eligible → user activates for 2 hours when needed
→ Justification: "Creating new app registration for Project X"
→ Approval: IT Security manager approves
→ 2 hours later: role expires automatically
→ Compromised account: attacker has NO elevated access

PIM activation settings (configurable per role):
Max duration:              1 hour to 24 hours
Require justification:     Yes (always recommended)
Require approval:          Yes for Global Admin, Security Admin
Require MFA on activation: Yes always
Notification:              email to approvers + admin on activation

What roles should be managed in PIM?

High priority for PIM (manage ALL of these):
Global Administrator         → most powerful role in M365
Security Administrator       → manage security policies
Exchange Administrator       → access to all mailboxes
SharePoint Administrator     → access to all SharePoint data
Teams Administrator          → control Teams configuration
Compliance Administrator     → access to compliance data
Billing Administrator        → manage subscriptions and billing
User Administrator           → manage users (can reset passwords)
Privileged Role Administrator → manage PIM itself

Azure RBAC roles (also manage in PIM):
Owner (root management group)     → access to all Azure resources
Contributor (production sub)      → deploy/delete all Azure resources
User Access Administrator (prod)  → manage RBAC assignments

PIM for Azure resources:
→ PIM also works for Azure RBAC roles, not just Entra ID directory roles
→ Configure JIT access for production subscription Owner/Contributor
→ Same activation flow: eligible → activate → justification → approval

7. Scenario-Based Questions

Scenario: Design a Zero Trust identity strategy for a 5,000-person hybrid organisation.

  1. Hybrid identity: Entra Connect with Password Hash Sync + Seamless SSO. Enable password writeback. Hybrid Entra ID Join all existing domain-joined devices.

  2. MFA for everyone: Conditional Access — require MFA for all users, all cloud apps. Use Authenticator with number matching. Enable SSPR with writeback.

  3. Block legacy auth: Conditional Access — block all legacy authentication protocols. Highest-impact single action.

  4. Device compliance: Intune enrolment required. Conditional Access — require compliant device for Office 365. Unmanaged devices: browser-only.

  5. Risk-based policies (P2): Identity Protection — sign-in risk ≥ Medium: require MFA. User risk = High: require password change.

  6. PIM for all admin roles: no standing admin assignments. All admin roles eligible-only. Activation requires justification + approval + MFA.

  7. Named locations: define corporate IP ranges. Consider excluding trusted IPs from MFA requirement (risk tolerance dependent).

  8. Break-glass accounts: two cloud-only Global Admin accounts excluded from ALL CA policies. Azure Sentinel alert on any sign-in.

  9. Access Reviews (P2): quarterly review of admin roles, guest user access, and sensitive group memberships.

  10. Password Protection: deploy DC Agent to all domain controllers. Add company name and product names to custom banned list.


Scenario: A user is locked out and cannot sign in. How do you diagnose?

  1. Check sign-in logs first: Entra ID → Sign-in logs → search for user → check error code:

    50076: MFA required but not completed
    53003: Conditional Access blocked access
    50126: Invalid username or password
    50053: Account locked (smart lockout triggered)
    50057: Account disabled in Entra ID
    70011: Invalid grant / token expired
    
  2. Check account status: Entra ID → Users → find user → verify "Account enabled" toggle is ON.

  3. Check Conditional Access: if error 53003 → use "What If" tool in CA to simulate the sign-in and identify which policy blocked.

  4. Check MFA registration: user changed phone? MFA methods stale? Issue a Temporary Access Pass (TAP) for re-registration.

  5. Check Identity Protection: user risk = High? → require password reset. Sign-in risk = High? → may be blocked by risk policy.

  6. Resolution options:

    • Unlock: dismiss smart lockout from Entra ID portal
    • Reset password: admin reset or SSPR
    • Issue TAP: Temporary Access Pass for MFA bootstrap/recovery
    • Dismiss risk: in Identity Protection if confirmed false positive

Tip: Always check sign-in logs first — exact error codes explain the failure. The CA "What If" tool is invaluable for diagnosing CA-related lockouts without the user retrying.


Scenario: Onboard 500 external partner users for a 6-month project.

  1. Create an Entitlement Management access package containing all project resources — SharePoint project site, Teams team, project M365 group.

  2. Add partner's Entra ID tenant as a connected organisation — enables B2B federation with partners' own credentials.

  3. Self-service request: configure access package as requestable by connected organisation users. Partners visit myaccess.microsoft.com to request.

  4. Approval workflow: project manager approves requests. Auto-deny if no response within 7 days.

  5. Time-limited access: set access package policy to expire in 180 days. No manual cleanup — access revoked automatically at expiry.

  6. Guest Conditional Access: require MFA for all guest sign-ins. Configure cross-tenant trust to accept partner's MFA claims (avoid double-prompt).

  7. Mid-project access review: at 3 months, project manager recertifies which guests still need access. Revoke inactive guests.

  8. Offboarding: access expires automatically at 6 months. Run monthly cleanup of stale guest accounts via Access Reviews.


Scenario: Investigate a suspected account compromise.

  1. Immediate containment: Entra ID → User → Revoke sessions. Invalidates all existing tokens — forces re-authentication. Reset password immediately.

  2. Check Identity Protection: review user risk level and specific detections. Look for leaked credentials, impossible travel, anonymous IP.

  3. Review sign-in logs: look for unusual locations, legacy auth protocol usage, credential stuffing patterns (multiple failures then success), unusual hours.

  4. Review audit logs: look for:

    • New app consents granted (attacker adds persistent OAuth app)
    • New MFA methods registered (attacker adds their own phone)
    • Role assignments changed
    • New applications or credentials created
  5. Check OAuth app consents: attacker may have granted a malicious app read access to mailbox/OneDrive. Review enterprise app consents granted by the user. Revoke suspicious consents.

  6. Check mail forwarding rules: compromised accounts often have auto-forwarding rules. Check Exchange Online for forwarding rules created by the user.

  7. Remediate: once password reset and sessions revoked → dismiss user risk in Identity Protection. Monitor for 30 days.


8. Cheat Sheet — Quick Reference

Authentication Methods Priority

Most secure (phishing-resistant):
1. FIDO2 security keys (hardware)
2. Windows Hello for Business (biometric/PIN + TPM)
3. Certificate-based authentication

Strong (recommended for most users):
4. Microsoft Authenticator (push with number matching)
5. OATH TOTP (authenticator apps)

Weak (avoid or phase out):
6. SMS / Voice OTP (SIM swap vulnerable)
7. Password alone (phishing/spray vulnerable)

Emergency:
8. Temporary Access Pass (time-limited, for recovery only)

RBAC Scope Hierarchy

Management Group
  └── Subscription
       └── Resource Group
            └── Resource

Role assignment at parent scope = inherited by all children
More specific (lower scope) assignment overrides parent

Built-in roles:
Owner           = Contributor + assign RBAC
Contributor     = full resource management, NO RBAC assignment
Reader          = read-only to all resources
User Access Admin = manage RBAC only, no resource access

Entra ID Roles vs Azure RBAC

Entra ID roles (directory):          Azure RBAC roles (resources):
→ Global Administrator               → Owner
→ User Administrator                 → Contributor
→ Conditional Access Administrator   → Reader
→ Security Administrator             → Key Vault Secrets Officer
→ Application Administrator          → Storage Blob Data Contributor

These are COMPLETELY SEPARATE systems.
Global Admin ≠ Owner (no implicit Azure resource access)

Conditional Access Policy Templates

Policy 1: Require MFA for all users (most important):
  Users: All  |  Apps: All cloud apps
  Grant: Require MFA
  Exclude: Break-glass accounts

Policy 2: Block legacy authentication (highest impact):
  Users: All  |  Apps: All cloud apps
  Conditions: Client apps = Exchange ActiveSync + Other clients
  Grant: Block access

Policy 3: Require compliant device for Office 365:
  Users: All  |  Apps: Office 365
  Grant: Require device compliance (Intune)

Policy 4: Browser-only for personal devices:
  Users: All  |  Apps: SharePoint / OneDrive
  Conditions: Device state = Unregistered
  Session: App-enforced restrictions (browser only)

Policy 5: Risk-based MFA (P2):
  Sign-in risk ≥ Medium → Require MFA
  Sign-in risk = High   → Block access
  User risk = High      → Require password change

Hybrid Identity Decision

Choose Password Hash Sync (PHS) when:
→ Most organisations — simplest and most resilient
→ Want leaked credential detection (Identity Protection)
→ Want authentication to work if on-prem is unavailable
→ Migrating away from AD FS

Choose Pass-Through Authentication (PTA) when:
→ Policy prohibits any password data (even hashed) in cloud
→ Need real-time on-prem account state enforcement

Choose Federation (AD FS) when:
→ Smart card / certificate authentication required
→ Already heavily invested in AD FS infrastructure
→ Complex claims transformation needed
→ (Consider migrating away from AD FS for simplicity)

PIM Role Management

Priority roles for PIM (all should be eligible, not permanent):
Entra ID roles:
  Global Administrator, Security Administrator, Exchange Administrator,
  SharePoint Administrator, Teams Administrator, Compliance Administrator,
  User Administrator, Privileged Role Administrator

Azure RBAC roles:
  Owner (production subscription), Contributor (production),
  User Access Administrator (production)

Activation settings:
  Max duration: 1-4 hours for most admin roles
  Require justification: always
  Require approval: Global Admin, Security Admin, PRA
  Require MFA: always

Only permanent active:
  Break-glass accounts (2 maximum, excluded from all CA policies)

Top 10 Tips

  1. Entra ID ≠ Active Directory — no Kerberos, no OUs, no GPOs, no forests. Entra ID uses OAuth 2.0/OIDC for cloud apps, AD DS uses Kerberos for domain-joined machines. Know this fundamental distinction.

  2. App Registration ≠ Enterprise Application — App Reg = global app definition. Enterprise App = service principal instance in a tenant. One app registration → many service principals across tenants.

  3. Managed Identity over service principal + secret — no credential management, no rotation risk, no leakage. Always recommend for Azure-to-Azure authentication scenarios.

  4. Block legacy auth = highest single-impact security action — legacy auth (POP, IMAP, SMTP basic auth) cannot support MFA. Primary attack vector for credential stuffing. One Conditional Access policy blocks it all.

  5. PIM = no standing admin access — all admin roles should be eligible-only with JIT activation. Permanent Global Admin = massive blast radius if compromised. Always recommend PIM for any admin role discussion.

  6. Password Hash Sync is recommended over AD FS — PHS is simpler, more resilient (works if on-prem fails), and enables leaked credential detection. AD FS is complex and Microsoft recommends migrating away.

  7. Break-glass accounts are mandatory — two cloud-only Global Admins excluded from ALL CA policies. Azure Sentinel alert on any sign-in. Without them, a CA misconfiguration can lock you out permanently.

  8. Access Reviews for compliance — quarterly reviews of admin roles, guest users, and sensitive groups. Evidence for SOC 2, ISO 27001, and GDPR audits. Auto-deny on non-response is the strict-but-recommended setting.

  9. Entitlement Management for external access at scale — access packages + connected organisations = self-service B2B access with time-limits and auto-expiry. Far better than manually managing guest users.

  10. Continuous Access Evaluation (CAE) closes the token expiry window — without CAE, a disabled user's token remains valid for up to 1 hour. With CAE, revocation is near-instantaneous. Know this for any breach response scenario.



Saturday, May 2, 2026

Microsoft 365 Security & Compliance (Purview) Complete Guide

Microsoft 365 Security & Compliance (Purview) — Complete Guide

Sensitivity Labels · DLP · Retention · eDiscovery · Audit · Insider Risk · Zero Trust · Conditional Access · Scenarios · Cheat Sheet


Table of Contents

  1. Core Concepts — Basics
  2. Information Protection & Sensitivity Labels
  3. Data Loss Prevention (DLP)
  4. Data Lifecycle Management & Retention
  5. eDiscovery, Audit & Insider Risk
  6. Identity Protection & Zero Trust
  7. Scenario-Based Questions
  8. Cheat Sheet — Quick Reference

1. Core Concepts — Basics

What is Microsoft Purview and what does it cover?

Microsoft Purview is the unified data governance, risk, and compliance platform in Microsoft 365 — rebranded from Microsoft 365 Compliance Centre in 2022, consolidating Microsoft Information Protection (MIP) and Azure Purview under one brand.

Core capability areas:

Capability Description
Information Protection Sensitivity labels, encryption, rights management
Data Loss Prevention Detect and prevent oversharing of sensitive information
Data Lifecycle Management Retention policies, retention labels, records management
eDiscovery Search, preserve, and export content for legal investigations
Audit Comprehensive activity logging across M365 services
Compliance Manager Assess compliance posture against regulations (GDPR, ISO 27001, HIPAA)
Insider Risk Management Detect risky user behaviour before data leaks occur
Communication Compliance Monitor communications for policy violations

What are the key Microsoft 365 compliance licence tiers?

Feature E3 E5
Audit log retention 90 days 1 year (+10yr add-on)
eDiscovery Standard Premium (Advanced)
Insider Risk Management No Yes
Communication Compliance No Yes
Advanced DLP (Endpoint) Limited Full
Auto-labelling policies Limited Full
Customer Lockbox No Yes
MailItemsAccessed audit No Yes

Warning: Always clarify licence tier before designing a compliance solution. Insider Risk, Communication Compliance, and Advanced eDiscovery require E5 or the E5 Compliance add-on.


What is the Microsoft Purview compliance portal?

The Microsoft Purview compliance portal (compliance.microsoft.com) is the central management interface.

Key features:

  • Content Explorer: shows WHERE sensitive content lives (which sites, mailboxes, folders)
  • Activity Explorer: shows WHAT is happening to labelled content (label applied, removed, file shared externally)
  • Compliance Manager: compliance score dashboard with improvement actions per regulation
  • Solutions: access to all compliance tools — Information Protection, DLP, Records Management, eDiscovery, Audit

Tip: Content Explorer and Activity Explorer are powerful diagnostic tools — the "what" and "where" of your data estate.


2. Information Protection & Sensitivity Labels

What are Sensitivity Labels and how do they work?

Sensitivity Labels are metadata tags applied to emails, documents, meetings, and Microsoft 365 containers (Teams, SharePoint sites, M365 Groups) that define how content should be protected.

Typical label taxonomy:
Public              → no restrictions — safe for external sharing
General             → internal use, no encryption
Confidential
  ├── All Employees   → internal only, no encryption
  └── Specific People → encrypted, only named recipients open
Highly Confidential
  └── Restricted     → encrypted, watermarked, no forwarding/copy/print

What a label can enforce:
→ Encryption (Azure Rights Management): who can open, copy, print, forward
→ Content marking: header ("CONFIDENTIAL"), footer, watermark
→ Access control: prevent edit, copy, print, forward, screen capture
→ Container settings (Teams/SPO sites):
   Privacy: Public or Private (enforced)
   External sharing: blocked
   Unmanaged device access: browser-only or blocked
→ Auto-labelling: apply when sensitive info types detected

Label persistence:
→ Travels with the file wherever it goes
→ Emailed externally, stored in Dropbox, opened on personal device
→ Encryption follows the document — not the location

What is the difference between manual, recommended, and auto-labelling?

  1. Manual labelling: user selects from Sensitivity button in Office apps/Outlook/Teams. Relies on user judgment.

  2. Recommended labelling: client detects sensitive content → pops up recommendation. User can accept or dismiss.

  3. Mandatory labelling: user must select a label before saving or sending — forces deliberate classification.

  4. Auto-labelling (client-side): automatically applies label when sensitive content detected. No user prompt. Works in Office apps.

  5. Auto-labelling policies (service-side): scan content at rest in SharePoint, OneDrive, and Exchange. Applies labels as a background service — catches existing content without user interaction. Requires E5.

Tip: Service-side auto-labelling policies are the most powerful — they scan ALL existing content and label it centrally. The answer to "how do you label millions of existing documents."


What is Azure Rights Management (ARM) and how does it underpin sensitivity labels?

Azure Rights Management is the cloud-based encryption and access control service that enforces sensitivity label protection.

How it works:
1. User applies "Confidential – Specific People" label to a document
2. AIP client encrypts the document with AES-256
3. A use licence is stored: who can access + what they can do
4. When recipient opens: their identity verified via Entra ID
5. If authorised: document decrypts in memory, permissions enforced
   If not authorised: document stays encrypted — cannot open

Permissions ARM can enforce:
VIEW (open/read)        → can read only
EDIT                    → can edit but not copy/print
COPY                    → can copy content to clipboard
PRINT                   → can print
FORWARD                 → can forward (email)
REPLY                   → can reply
EXTRACT                 → can copy/paste content

Super Users:
→ A designated group that can decrypt ANY ARM-protected content
→ Used by eDiscovery administrators and compliance officers
→ Must be explicitly configured — no default super users

3. Data Loss Prevention (DLP)

What is Data Loss Prevention (DLP) in Microsoft Purview?

DLP policies detect and prevent sharing of sensitive information across Microsoft 365. They monitor content, match against sensitive information types or labels, and take protective actions.

DLP policy structure:

1. Locations (where policy applies):
   → Exchange (email)
   → SharePoint Online
   → OneDrive for Business
   → Microsoft Teams chat and channel messages
   → Endpoint devices (Windows/macOS via MDE)
   → Power Platform
   → Microsoft Defender for Cloud Apps

2. Conditions (what triggers the policy):
   → Content contains: SITs (Credit Card, SSN, NHS No., IBAN)
   → Content is labelled: Highly Confidential
   → Being shared: externally / with specific domains
   → Instance count: ≥ 3 credit card numbers

3. Actions (what happens):
   → Block the action (prevent send/share)
   → Block with override (user overrides with justification)
   → Restrict access (accessible to owner only)
   → Show policy tip to user
   → Alert admin / send incident report
   → Quarantine the email

What are Sensitive Information Types (SITs)?

SITs are pattern definitions used to detect sensitive data in content — the "what to look for" in DLP and auto-labelling policies.

Type Description
Built-in SITs 300+ pre-defined (Credit Card, SSN, NHS No., IBAN, Passport No.) — use regex + keyword proximity + checksum
Custom SITs Organisation-specific patterns (employee IDs, project codes) — regex + keyword lists + confidence levels
Trainable classifiers AI/ML models trained on document types ("Legal Contract", "HR Document", "Source Code")
Named entities ML-based detection of personal names, addresses, medical terms — context-aware
Custom SIT example — Employee ID:
Pattern: EMP-[0-9]{6}   (e.g., EMP-123456)
Supporting keywords: "employee", "staff ID", "badge number"
Confidence levels:
  High:   pattern match + keyword within 200 chars
  Medium: pattern match alone

Custom SIT use in DLP:
→ Condition: content contains "Employee ID" custom SIT
→ Action: block external sharing, alert HR compliance team

What is Endpoint DLP?

Endpoint DLP extends Purview DLP policies to Windows 10/11 and macOS devices enrolled in Microsoft Defender for Endpoint (MDE).

Activities monitored and controlled:

  1. Copy to USB/removable media: block or audit
  2. Copy to network share: prevent unauthorised locations
  3. Upload to cloud services: block personal Dropbox, Google Drive, personal OneDrive
  4. Print: block or audit printing of sensitive files
  5. Clipboard copy: block copying content from sensitive documents
  6. Unallowed apps: prevent opening sensitive files in unauthorised apps

Warning: Endpoint DLP requires devices onboarded to Microsoft Defender for Endpoint. Devices not in MDE are unprotected — a common deployment gap.


4. Data Lifecycle Management & Retention

What are retention policies vs retention labels?

Retention policy: applied to a location (all SharePoint sites, all Exchange). Blunt instrument — retains or deletes everything in that location.

Retention label: applied to individual items. Provides item-level lifecycle management. Can declare items as records.

Retention policy (location-level):
→ Applied to: All SharePoint, All Exchange, All Teams
→ Setting: Retain 3 years, then delete
→ Effect: EVERYTHING in those locations retained for 3 years
→ Users cannot delete items during retention period

Retention label (item-level):
→ Applied to: specific documents, emails, or library items
→ Setting: "Contract" label → Retain 7 years, then disposition review
→ Effect: only labelled items have 7-year retention
→ Can declare records (immutable)

Priority rules :
1. Retain wins over delete
2. Longer retention wins over shorter
3. Explicit retention label wins over implicit retention policy

Example:
Retention policy: delete after 3 years
Retention label on item: retain for 7 years
→ RESULT: item kept for 7 years (label wins, longer wins)

Tip: The priority rule is a guaranteed question. "Preserve wins over delete, longer wins over shorter, label wins over policy."


What is Records Management and what is a regulatory record?

Record Type Description
Record Locked from editing/deletion during retention. Label CAN be removed by site owner. Most common.
Regulatory record Strictest — label cannot be removed, content cannot be edited or deleted by ANYONE (including Global Admins) during retention period. Requires admin opt-in.
Disposition review At end of retention period — reviewers must approve deletion or extend before auto-deletion. Full audit trail.
File plan Structured classification system mapping business functions to retention labels. Exportable for regulatory review.

Critical: Regulatory records are irreversible. Once declared, no one — including Global Admins — can delete the content until the retention period expires. Test thoroughly before enabling in production.


What is Preservation Lock?

Preservation Lock locks a retention policy so it cannot be turned off or weakened — even by Global Admins. It is permanent and irreversible.

What Preservation Lock prevents:
→ Cannot decrease the retention duration
→ Cannot disable the policy
→ Cannot remove locations

What is still allowed:
→ Can ADD more locations
→ Can EXTEND the retention period (only strengthening)

Use cases:
→ SEC Rule 17a-4(f) — financial services record immutability
→ FINRA, CFTC regulations
→ Any regulation requiring "policies cannot be circumvented by insiders"

Enable via PowerShell (not available in UI):
Set-RetentionCompliancePolicy -Identity "SEC Records Policy" `
  -RestrictiveRetention $true

Critical: Preservation Lock is permanent. If you lock a policy with incorrect settings, you cannot fix it. Always test retention policies thoroughly before locking.


5. eDiscovery, Audit & Insider Risk

What are the three levels of eDiscovery in Microsoft Purview?

Level Licence Key Features
Content Search Free Search across Exchange/SPO/OneDrive/Teams. Export. No case management, no holds.
eDiscovery (Standard) E3 Case-based. Add custodians, place holds, search within case, export.
eDiscovery (Premium) E5 Custodian management, legal hold notifications, review sets, predictive coding, redaction, chain-of-custody audit.
eDiscovery Standard workflow:
1. Create case: "Smith v Contoso 2025"
2. Add custodians: relevant employees
3. Place holds: preserve Exchange/SPO/OneDrive for custodians
4. Search: keyword + date + sender/recipient filters
5. Review: preview content, identify relevant items
6. Export: PST (email) or file format for legal review

Hold types:
Query-based hold: only items matching search query preserved
Full hold:        ALL custodian content preserved

eDiscovery Premium additions:
→ Legal hold notifications: formal notice to custodians via email workflow
→ Review sets: collect evidence, apply tags/annotations/redactions
→ Predictive coding: AI scores relevance — prioritise review
→ Export formats: native, PST, PDF with bates numbering

What is Microsoft Purview Audit?

Purview Audit captures a comprehensive log of user and admin activities across Microsoft 365.

Audit tiers:
Standard (E3): 90-day retention, standard activities
Premium (E5):  1-year default (10-year add-on), high-value events

Key activities captured:
SharePoint: FileAccessed, FileSharingInvitationCreated,
            SitePermissionsModified, SensitivityLabelApplied
Exchange:   MailItemsAccessed (Premium only!), Send,
            SoftDelete, HardDelete, RecordDelete
Teams:      MeetingParticipantDetail, ChatCreated, MessageSent
Admin:      AddUser, ResetPassword, AssignRole, ChangePolicy

Search via portal:
Purview → Audit → New search
→ Filter: User, Activity type, Date range, Workload
→ Export to CSV for analysis

PowerShell:
Search-UnifiedAuditLog `
  -StartDate "2025-01-01" -EndDate "2025-01-31" `
  -Operations "FileAccessed" `
  -UserIds "user@contoso.com" `
  -ResultSize 5000

Tip: MailItemsAccessed (Premium audit only) shows which emails a compromised account READ — not just sent. Critical for breach investigations. This is the key E5 audit differentiator.


What is Insider Risk Management?

Insider Risk Management (IRM) uses Microsoft 365 signals to detect risky user behaviour patterns before they result in data leaks.

Built-in policy templates:

Template Detects
Data theft by departing employee Mass downloads, USB copies, sharing spikes in 90 days before/after last day
General data leaks Unusual uploads to personal cloud, email to personal accounts, USB copies
Data leaks by priority users Enhanced monitoring for executives, employees with elevated access
Security policy violations Repeated disabling of security software, bypassing controls
Patient data misuse Inappropriate access to patient records (Healthcare)

Warning: IRM requires HR and Legal involvement. Only compliance investigators see alerts — not regular managers. Involve your Data Protection Officer before deployment.


What is Communication Compliance?

Communication Compliance monitors internal and external communications for policy violations.

Policy types:
Offensive language / harassment  → detect threats, discrimination in Teams/email/Yammer
Financial regulatory compliance  → detect potential SEC/FINRA violations
Confidential info disclosure     → detect inappropriate sharing of business secrets
Conflict of interest             → detect undisclosed conflicts
Custom policies                  → keyword lists, SITs, trainable classifiers

Workflow:
Policy configured → communications captured and analysed
  → ML model scores each communication
  → High-confidence matches → alert for reviewer
  → Reviewer: Resolve / Escalate / Tag / Notify user
  → Full audit trail of all review actions

Requirements:
→ E5 or Communication Compliance add-on
→ Reviewers need Communication Compliance Analyst role
→ Privacy notice to users required in most jurisdictions (legal review)

6. Identity Protection & Zero Trust

What is Microsoft Defender for Office 365?

MDO protects against advanced email threats bypassing basic spam/malware filters.

Feature How It Works
Safe Attachments Opens attachments in a virtual sandbox (detonation) before delivery. Malicious → blocked. Adds 1-5 min delay.
Safe Links Replaces URLs with Microsoft-proxied links. Re-evaluates at time-of-click for malicious content.
Anti-phishing ML detects impersonation attacks, domain lookalikes, spear phishing, BEC.
Attack Simulation Training Send simulated phishing emails. Track who clicked. Auto-enrol clickers in security training.
Threat Explorer Investigate email threats — malicious emails received, delivery actions, users targeted.

Tip: Safe Attachments = sandboxing on delivery. Safe Links = time-of-click re-evaluation. Both are frequently asked about in .


What is Zero Trust and how does Microsoft implement it?

Zero Trust assumes breach and requires every access request to be explicitly authorised regardless of network location.

Three Zero Trust principles:

  1. Verify explicitly: authenticate and authorise based on all available signals — identity, location, device health, data classification, anomalies
  2. Use least privilege access: just-in-time, just-enough access; risk-based adaptive policies
  3. Assume breach: minimise blast radius, segment access, verify encryption, use analytics
Microsoft Zero Trust pillars:
Identity        → Entra ID, MFA, Conditional Access, PIM
Endpoints       → Intune, Defender for Endpoint, compliance policies
Applications    → Defender for Cloud Apps, app governance
Data            → Purview sensitivity labels, DLP, encryption
Infrastructure  → Defender for Cloud, RBAC, Azure Policy
Network         → Network segmentation, Defender for Identity, Azure Firewall

Zero Trust access evaluation example:
User accesses SharePoint:
1. Is identity verified? (MFA complete) → Yes
2. Is device compliant? (Intune managed, patches current) → Yes
3. Is location allowed? (not blocked by Conditional Access) → Yes
4. Is data appropriately labelled? (sensitivity label applied) → Yes
All checks passed → access granted with minimum permissions

What is Conditional Access?

Conditional Access is the Entra ID policy engine that evaluates signals and enforces access decisions — the "if/then" engine of Zero Trust.

# Conditional Access policy structure:
WHEN (Assignments):
  Users: All users / Specific groups / Guest users
  Apps:  All cloud apps / Specific apps (SharePoint, Teams)
  Conditions:
    Sign-in risk:    Low / Medium / High (Identity Protection)
    Device platform: Windows / iOS / Android
    Location:        Trusted IP ranges / Named locations / Countries
    Client apps:     Browser / Mobile apps / Legacy auth clients
    Device state:    Compliant / Hybrid joined / Unmanaged

THEN (Access controls):
  Block access
  OR Grant with conditions:
    Require MFA
    Require device compliance (Intune)
    Require hybrid Azure AD join
    Require approved client app
  Session controls:
    Sign-in frequency (re-auth every X hours)
    Persistent browser: No (close browser = sign out)
    App-enforced restrictions (browser-only on SharePoint)

Key policies to implement:
1. Require MFA for all users (exclude break-glass accounts)
2. Block legacy authentication (highest-impact single policy)
3. Require compliant device for Office 365 apps
4. Allow SharePoint from personal devices — browser only
5. Block access from high-risk sign-in locations
6. Require MFA for admin roles always

Tip: Blocking legacy authentication is the highest-impact single security action. Legacy auth (POP, IMAP, SMTP, basic auth) cannot support MFA — it's the primary vector for credential stuffing attacks.


What is Privileged Identity Management (PIM)?

PIM provides just-in-time (JIT) privileged access — users hold elevated roles only when needed, for limited time, with approval and audit trail.

PIM role assignment types:
Eligible: user CAN activate the role but is not permanently assigned
Active:   role is live — user has elevated permissions now
Permanent active: always active (break-glass accounts only)

Activation flow:
User requests activation → provides justification → selects duration
  → Approval required from designated approver(s)
  → MFA required at activation
  → Role active for requested duration (max configurable)
  → After duration: role auto-deactivates

Without PIM:
Global Admin → permanently assigned → compromised account
= attacker has Global Admin permanently

With PIM:
Global Admin eligible → user activates for 2 hours when needed
→ Justification: "Creating new app registration for Project X"
→ Approval: IT Security manager approves
→ After 2 hours: role expires automatically
→ Compromised account: attacker has NO elevated access

Key roles to manage in PIM:
Global Administrator, SharePoint Administrator, Exchange Administrator,
Teams Administrator, Security Administrator, Compliance Administrator

Tip: PIM is one of the most impactful Microsoft 365 security controls. Nobody should have permanent standing Global Admin access — always a key recommendation in any security assessment.


7. Scenario-Based Questions

Scenario: Design a data protection strategy for a financial services firm under GDPR.

  1. Sensitivity label taxonomy: Public / Internal / Confidential (All Staff) / Confidential (Finance) / Highly Confidential (PII). Highly Confidential enforces encryption, no external sharing, watermarking.

  2. Auto-labelling policies: scan all SharePoint, OneDrive, Exchange — auto-apply "Confidential (PII)" label when EU GDPR SITs detected (EU National IDs, credit cards, IBAN, health info).

  3. DLP policies:

    • Block external sharing of content containing personal data SITs
    • Prevent emailing EU personal data to non-approved domains
    • Endpoint DLP: block USB copy of PII-containing files
  4. Retention policies:

    • 6-year financial records retention (regulatory requirement)
    • Separate 3-year personal data retention (GDPR data minimisation)
    • Disposition review at end of period — human review before deletion
  5. Audit: Enable E5 Advanced Audit. 1-year audit log retention. Alerts for mass file downloads and unusual external sharing.

  6. Conditional Access: MFA enforced for all, compliant device required, block legacy auth, browser-only for financial apps on personal devices.

  7. Compliance Manager: track GDPR assessment score, document evidence of controls, work through improvement actions.


Scenario: Suspected data exfiltration by a departing employee. How do you investigate?

  1. Insider Risk Management: check IRM "departing employee" alerts for the user. Review risk timeline showing download spikes, USB activity, cloud upload patterns.

  2. Audit log search:

    Search-UnifiedAuditLog -StartDate "2025-01-01" -EndDate "2025-03-01" `
      -UserIds "employee@contoso.com" `
      -Operations "FileDownloaded,FileSyncDownloadedFull,Send,MailItemsAccessed"
    

    Look for: volume/timing of downloads, mass sync, emails to personal accounts.

  3. eDiscovery case: create Standard/Premium case. Place hold on employee's Exchange mailbox and OneDrive to preserve evidence immediately.

  4. Content search: search for company IP (product names, internal codenames) in the employee's outbound email to personal addresses.

  5. Endpoint DLP: review DLP incident reports for USB copy activity from the employee's device.

  6. Legal hold notification: if proceeding legally, issue formal hold via eDiscovery Premium custodian management.

  7. Preserve before offboarding: convert mailbox to Inactive Mailbox before deleting the account. Apply retention hold on OneDrive. Do NOT delete the account immediately.


Scenario: A user cannot delete a document they created. Why and how do you resolve it?

Diagnose in order:

  1. Retention label: open document in SharePoint → View properties → check for applied retention label. "Record" or active retention period = deletion blocked.
  2. Retention policy: Purview → Data Lifecycle Management → Retention policies → check if any policy covers the site with active retention.
  3. eDiscovery hold: check active eDiscovery cases — if document is in scope of a hold, deletion is blocked by the hold, not the policy.
  4. Sensitivity label permissions: check if the label restricts deletion to owners only.

Resolution:

  • Retention label: site owner or records manager can remove non-regulatory labels. Regulatory records: cannot be removed until retention period expires.
  • Retention policy: wait for expiry, or modify policy scope if appropriate.
  • eDiscovery hold: must be released by the eDiscovery case manager — cannot be bypassed by admin.

Scenario: Implement comprehensive email security for a 1,000-person organisation.

  1. Block legacy authentication (highest-impact single action): Conditional Access → block POP, IMAP, SMTP AUTH, basic auth for all users.

  2. Enforce MFA: Conditional Access → require MFA for all users, all cloud apps. Use Authenticator app (not SMS for sensitive roles).

  3. Enable Defender for Office 365 Plan 2:

    • Safe Attachments: all internal + external email
    • Safe Links: email + Teams + Office apps
    • Anti-phishing: impersonation protection for all executives
  4. Configure email authentication (DNS):

    SPF:   v=spf1 include:spf.protection.outlook.com -all
    DKIM:  Add DKIM signatures via Exchange Admin Centre
    DMARC: v=DMARC1; p=reject; rua=mailto:dmarc@contoso.com
    

    DMARC p=reject prevents spoofing of your domain.

  5. DLP on email: detect and block exfiltration of sensitive data (credit cards, PII, financial data) via email.

  6. Attack Simulation Training: quarterly phishing simulations. Auto-enrol clickers in security awareness training.

  7. Mailbox audit (E5): enable MailItemsAccessed for all sensitive mailboxes (executives, finance, HR).

  8. PIM for admin roles: no standing Exchange Admin or Global Admin. Activate via PIM with approval + justification.


Scenario: How do you assess and improve your organisation's compliance posture?

  1. Compliance Manager: navigate to Purview → Compliance Manager. Review compliance score across regulations (GDPR, ISO 27001, NIST, HIPAA). Score is expressed as a percentage of controls implemented.

  2. Improvement actions: Compliance Manager lists specific improvement actions — each with description, implementation guidance, points value, and test status. Prioritise high-point, high-impact actions.

  3. Assessments: create regulation-specific assessments. Map Microsoft-managed controls (what Microsoft does) and customer-managed controls (what you must do).

  4. Evidence collection: for each customer-managed control, upload evidence (policies, screenshots, certificates). Compliance Manager stores evidence for audit.

  5. Regulatory templates: Compliance Manager includes 300+ pre-built templates for global regulations. Use the template for your specific regulation(s).

  6. Action tracking: assign improvement actions to team members with due dates. Track completion status. Compliance Manager integrates with Microsoft Secure Score.


8. Cheat Sheet — Quick Reference

Sensitivity Label Hierarchy

Public → General → Confidential → Highly Confidential → Regulatory

Each level adds more protection:
Public:            No restrictions
General:           Internal only, no encryption
Confidential:      May include encryption, content marking
Highly Confidential: Encryption required, no external sharing, watermark
Regulatory:        All above + immutable record declaration

Container label (Teams/SharePoint site):
→ Privacy enforcement (Public/Private)
→ External sharing restriction
→ Unmanaged device restriction
→ Documents created inherit the container label

DLP Policy Quick Reference

Locations:
Exchange (email)         SharePoint         OneDrive
Teams chat/channel       Endpoint devices   Power Platform

Conditions:
Contains SIT             Labelled as        Shared externally
Instance count ≥ N       Recipient domain   File extension

Actions (least to most restrictive):
Policy tip only          Notify + allow     Override with justification
Block with override      Block completely   Quarantine + alert admin

Priority of DLP policies:
Lower number = higher priority
First matching policy wins (unless "Stop processing more rules" disabled)

Retention Priority Rules

Rule 1: Retain wins over delete
  Retention policy says delete after 3 years
  Retention label says retain for 7 years
  → Content retained for 7 years (retain wins)

Rule 2: Longer retention wins over shorter
  Policy 1: retain 3 years
  Policy 2: retain 5 years
  → Content retained for 5 years (longer wins)

Rule 3: Explicit label wins over implicit policy
  Retention policy applies to entire SharePoint site
  Retention label applies to specific document
  → Label settings apply to that document (explicit wins)

Hold priority:
eDiscovery hold > Retention label > Retention policy
(Holds always win — preserve for legal proceedings)

eDiscovery Levels

Content Search (Free):
→ Search across all M365 locations
→ Export results
→ No holds, no case management

eDiscovery Standard (E3):
→ Case management
→ Custodian holds (preserve content)
→ Case-scoped searches and exports

eDiscovery Premium (E5):
→ All Standard features
→ Legal hold notifications to custodians
→ Review sets with tags, annotations, redactions
→ Predictive coding (AI relevance scoring)
→ Chain-of-custody audit trail
→ Multiple export formats with bates numbering

Conditional Access Key Policies

Policy 1 — Require MFA for all users:
  Users: All   Apps: All cloud apps
  Grant: Require MFA
  Exclude: Break-glass accounts, service accounts

Policy 2 — Block legacy authentication (HIGHEST IMPACT):
  Users: All   Apps: All cloud apps
  Conditions: Client apps = Exchange ActiveSync + Other clients
  Grant: Block access

Policy 3 — Require compliant device:
  Users: All   Apps: Office 365
  Grant: Require device compliance (Intune)

Policy 4 — Browser-only for personal devices:
  Users: All   Apps: SharePoint / OneDrive
  Conditions: Device state = Unregistered
  Session: App-enforced restrictions (browser only, no download)

Policy 5 — Admin MFA always:
  Users: All admin roles
  Apps: All cloud apps
  Grant: Require MFA + Require compliant device

PIM Quick Reference

Role states:
Eligible  → can activate, not currently active
Active    → currently has the elevated permissions
Permanent → always active (break-glass accounts only)

Activation settings (configurable per role):
Max duration:          1 hour to 24 hours
Require justification: Yes (always recommended)
Require approval:      Yes for Global Admin, Security Admin
Require MFA:           Yes always
Notification:          Email to approvers + admin

Recommended roles to manage in PIM:
Global Administrator      Security Administrator
SharePoint Administrator  Exchange Administrator
Teams Administrator       Compliance Administrator
Billing Administrator     User Administrator

Compliance Score Components

Microsoft Purview Compliance Manager score:
Total score = Points achieved / Total points possible × 100

Point categories:
Microsoft-managed controls: ~50% (what Microsoft does for you)
Customer-managed controls:  ~50% (what you must configure)

Priority improvement actions (high points):
→ Enable MFA for all users
→ Enable audit log recording
→ Configure sensitivity labels
→ Enable DLP policies
→ Configure retention policies
→ Enable Safe Attachments and Safe Links
→ Block legacy authentication
→ Enable PIM for privileged roles
→ Configure DMARC, SPF, DKIM
→ Enable Endpoint DLP

Top 10 Tips

  1. Retention priority: preserve beats delete, longer beats shorter, label beats policy — the most tested retention rule in every compliance . Know it by heart.

  2. Regulatory records are truly irreversible — once declared, no one including Global Admins can delete the content until retention expires. Always emphasise this for risk-aware recommendations.

  3. Block legacy authentication first — the highest single-impact security action. Legacy auth cannot support MFA and is the primary credential stuffing vector. Always recommend this before anything else.

  4. MailItemsAccessed requires E5 audit — this is the forensic differentiator. Shows which emails a compromised account READ. Knowing this detail separates candidates in breach investigation scenarios.

  5. Service-side auto-labelling covers existing content — client-side only works on content users open. Service-side scans ALL content in SharePoint/OneDrive/Exchange in the background. The answer to labelling millions of existing documents.

  6. PIM = no standing admin access — eligible assignments + JIT activation = minimal blast radius if accounts are compromised. Always recommend PIM over permanent admin roles.

  7. eDiscovery holds trump retention policies — a legal hold preserves content regardless of any retention policy configured to delete. Know this interaction for any litigation scenario.

  8. Preservation Lock is irreversible — only enable after thorough testing. Once locked, you cannot weaken the policy even as Global Admin. Regulatory requirement (SEC Rule 17a-4) is the primary use case.

  9. Endpoint DLP requires MDE onboarding — devices not in Microsoft Defender for Endpoint are not protected. Always check device onboarding coverage when designing Endpoint DLP.

  10. Compliance Manager score is actionable — it's not just a vanity metric. Each improvement action has specific guidance, evidence requirements, and point value. Walk through Compliance Manager to show you know how to systematically improve posture.



Featured Post

Create a Dataverse Table With Every Common Column Type Using Power Automate

Create a Dataverse Table With Every Common Column Type Using Power Automate Create a Dataverse Table With Every Common Column Typ...

Popular posts