Microsoft Azure Services and Architecture Questions
Microsoft Azure's core service catalog and architectural patterns: Virtual Machines, managed Kubernetes (AKS), App Service and Azure Functions, Storage accounts and managed disks, Azure SQL and Cosmos DB, VNets with hybrid connectivity and global load balancing, Microsoft Entra ID and RBAC, and Key Vault secrets and encryption. Covers Azure service selection, infrastructure as code (ARM, Bicep, Terraform), observability with Azure Monitor and Kusto queries, cost governance and Azure Policy, the Azure Well-Architected design principles, and hybrid management via Azure Arc, common in enterprise Azure estates. For provider-agnostic trade-offs, see the cross-cloud entries.
You're responsible for access control across multiple subscriptions. Describe a scalable RBAC and management-group design that enforces least privilege, separation of duties, and uses Azure Policy to apply guardrails. Explain role modeling, scoping decisions, and how to implement emergency break-glass access safely.
Sample Answer
Direct answer
Build the management group hierarchy around who owns the blast radius, not just around environment stage: a Platform group for the identity and connectivity subscriptions run by the platform team, a Dev-team group owning that team's own dev, staging, and prod subscriptions, and a Security group holding break-glass accounts and security tooling. Assign Azure role-based access control (RBAC) roles to Microsoft Entra ID (Azure's identity and access management service, formerly Azure Active Directory) groups at the lowest scope covering a real job function, layer Azure Policy at the management-group level for guardrails no role assignment can override, and treat break-glass access as a monitored, rarely-used path, not a standing credential.
Structured elaboration
Management group design.
flowchart TD
Root[Tenant root management group] --> Platform[Platform team management group]
Root --> DevMG[Dev team management group]
Root --> SecMG[Security team management group]
Platform --> Identity[Identity subscription]
Platform --> Connectivity[Connectivity subscription]
DevMG --> DevSub[Dev subscription]
DevMG --> StageSub[Staging subscription]
DevMG --> ProdSub[Prod subscription]
SecMG --> BreakGlass[Break glass emergency accounts]
This directly encodes organizational, not just environment, boundaries: Platform, the Dev team, and Security each own a distinct part of the hierarchy, so one team's guardrails and blast radius never accidentally apply to another team's subscriptions just because they share an environment label.
Role modeling. Start from actual job functions, not Azure's built-in role list: write down what a platform engineer, a workload developer, and a security auditor each need to do, then map each to the narrowest built-in role that covers it (Network Contributor for a platform network engineer, not Contributor). Write a custom role only when no built-in role fits, since a custom role is itself a directory object that now needs its own lifecycle and review.
Scoping decisions. Default to subscription-level assignment, since it matches the natural cost, quota, and policy boundary. Drop to resource-group scope only for a genuinely narrower job, such as a database team restricted to one resource group inside a shared application subscription. Reserve management-group scope for roles that must legitimately span every subscription beneath it, such as a central network team's Network Contributor role at the Platform management group.
Azure Policy guardrails. Policies assigned at the management-group level enforce what no RBAC assignment can, since RBAC governs who can act while Policy governs what is allowed to exist at all: denying public IP creation outside the Connectivity subscription, requiring specific tags, restricting allowed regions and SKUs, and requiring every subscription to send diagnostic logs to the central workspace. Policy evaluates every request regardless of who is making it, including a Global Administrator, which is exactly why it is the right layer for a guardrail an RBAC assignment could otherwise be used to bypass.
Break-glass access. At least two emergency-access accounts, cloud-only so an on-premises directory outage cannot lock you out, excluded from any Conditional Access policy (an Entra ID feature that enforces sign-in requirements, such as multi-factor authentication or a compliant device, before granting access) that could otherwise block them, with a strong credential stored offline rather than in a password manager an attacker who has already compromised the tenant might also reach. Any sign-in to a break-glass account triggers an immediate alert, and usage follows a documented incident process with a mandatory post-use access review, never a convenience shortcut for routine work.
Programmatic audit. Because the entire design is management groups, role assignments, and policy assignments, it is queryable end to end through Azure Resource Graph, a query service over resource metadata across the whole tenant. A scheduled query listing every management-group-scope role assignment, every tenant-wide Owner assignment, and every sign-in to a break-glass account turns the audit into something automated and repeatable instead of an annual manual review, and the same query can alert immediately when a new tenant-wide Owner assignment appears outside change control.
Worked example
A tenant has a Platform group holding 2 subscriptions, a Dev-team group holding 3 (dev, staging, prod), and a Security group holding 1. A policy denying public IP creation outside the Connectivity subscription is assigned at the tenant root. A developer holding Owner on the Dev-team's prod subscription requests a public IP there: RBAC evaluation allows the request, since Owner can create public IPs, but the independent Policy evaluation on that same request denies it. Removing that developer's RBAC role does nothing to loosen the Policy guardrail, and vice versa, because the two systems answer different questions about the same request. Separately, a scheduled Resource Graph query runs every 15 minutes against Entra ID sign-in logs for either break-glass account; a hit automatically files an incident ticket and pages the on-call security engineer, so the account's existence never depends on anyone remembering to check it manually.
Trade-offs and pitfalls
Modeling management groups purely by environment, with dev, staging, and prod at the top level, loses the team-ownership boundary this design needs: two unrelated teams' dev subscriptions would sit in the same group and inherit each other's guardrails by coincidence rather than intent. Over-using custom roles instead of built-ins creates a maintenance burden nobody remembers to update when Azure ships a new resource type. And assigning Azure Policy only at the subscription level, rather than the management group above it, leaves a gap the moment a new subscription is created, since the guardrail has to live above the point where subscriptions get added, not on each one individually after the fact.
Describe how to enable encryption at rest and encryption in transit for Azure Storage, Azure SQL Database, and Azure VM disks. Contrast platform-managed keys (Microsoft-managed) versus customer-managed keys (BYOK) stored in Key Vault / Managed HSM, and discuss when a customer might require BYOK or a Managed HSM.
Sample Answer
Direct answer
Azure Storage, Azure SQL Database, and Azure VM disks all encrypt data at rest by default using Microsoft-managed AES-256 keys and enforce encryption in transit through TLS 1.2 or higher, with no application changes required. The real design decision most teams make is whether to layer a customer-managed key (CMK, also called bring-your-own-key or BYOK) on top, held in Azure Key Vault or Azure Key Vault Managed HSM (a dedicated hardware security module service), which becomes a requirement rather than a preference under most regulatory or data-sovereignty mandates.
Structured elaboration
| Service | At rest (default) | In transit | Customer-managed key option |
|---|---|---|---|
| Azure Storage (Blob/Files/Queue/Table) | Storage Service Encryption, AES-256, cannot be disabled, applied transparently below the storage stack | HTTPS enforced by "secure transfer required"; SMB 3.0+ encryption for Azure Files | Wrap the account's data encryption key with a key in Key Vault or Managed HSM; disabling that key makes the account unreadable |
| Azure SQL Database | Transparent Data Encryption (TDE), on by default, encrypts the database, logs, and backups at the page level | TLS enforced by default for client connections | TDE with a customer-managed key: the database encryption key is protected by your asymmetric key in Key Vault or Managed HSM instead of the Microsoft-managed service key |
| Azure VM disks | Server-side encryption (SSE) on managed disks, on by default, applied at the storage-cluster level | Encryption applied to data moving between compute and disk storage | SSE with customer-managed keys, same Key Vault/Managed HSM wrapping pattern; optionally layer Azure Disk Encryption (BitLocker on Windows, dm-crypt on Linux) inside the guest OS for an additional layer |
Azure SQL Database also supports Always Encrypted, a separate, complementary control that encrypts specific sensitive columns client-side, so the data stays encrypted even from a database administrator with full access to the server, which is a different property than TDE's page-level, at-rest-only protection.
Platform-managed versus customer-managed keys. With platform-managed (Microsoft-managed) keys, Microsoft creates, rotates, and safeguards the key; there is zero operational burden, and it satisfies baseline compliance for most SOC 2 (an independent audit of how a service provider protects customer data) or ISO 27001 (an international standard for information security management) needs, but you cannot independently revoke access or prove exclusive control of the key to an auditor. With customer-managed keys, you control the key's creation, rotation cadence, and revocation; disabling or deleting the key in Key Vault is a real cryptographic kill switch that also cuts off Microsoft's own ability to read your data. That control comes with real operational responsibility: if the key becomes unavailable, so does your data, so the key needs the same high-availability discipline (soft delete, purge protection, an offline backup of the key material) as the data it protects.
Managed HSM specifically. Azure Key Vault Premium and Azure Key Vault Managed HSM are both FIPS 140-3 (the U.S. government standard for validating cryptographic hardware and software) Level 3 validated today (the Standard tier, by contrast, uses software-protected keys with no dedicated hardware at all). The real distinction between Premium and Managed HSM is not the compliance level, it is tenancy: Key Vault Premium runs your HSM-protected keys on a shared, multi-tenant HSM pool, while Managed HSM gives you a single-tenant HSM pool dedicated entirely to your organization, with its own security domain and its own administrative control plane (the management interface used to configure and administer the resource, distinct from the data plane that handles actual key operations), separate from Key Vault's role-based access control (RBAC) model. Choose Managed HSM when a regulator or contract requires a dedicated, non-shared hardware boundary, not merely "an HSM," or when you need that independent administrative control plane; otherwise Key Vault Premium already gives you HSM-backed keys without Managed HSM's higher cost floor.
Worked example
A healthcare ISV storing patient records in Azure SQL Database and Blob Storage needs to show, for a HIPAA (the U.S. law governing protection of patient health information) business-associate audit, that it can revoke Microsoft's technical ability to decrypt its data within a bounded time. With platform-managed keys this is not possible, since Microsoft holds the only key. With a customer-managed key in Key Vault, disabling or deleting that key makes the data unreadable once every dependent service's cached key-validity check next expires (each service's own caching interval, not an instantaneous cutoff, so the exact bound should be confirmed against current Microsoft Learn documentation for Storage and SQL specifically before it is written into a compliance commitment). If the auditor's requirement is a dedicated, non-shared hardware boundary rather than Key Vault Premium's shared HSM pool, the ISV moves that same key into Managed HSM instead, which changes the tenancy model without changing anything about how Storage or SQL consume the key.
Trade-offs and pitfalls
Treating a customer-managed key as a free security upgrade rather than an operational commitment is the most common mistake: an inaccessible or accidentally deleted key takes production data down with it. Assuming Managed HSM is "just a bigger Key Vault" misses that it is a separate resource type with its own RBAC model and a materially higher cost floor, so most teams should default to Key Vault Premium and only move to Managed HSM when a specific requirement forces the single-tenant boundary. Finally, conflating "encrypted in transit" with "authenticated" is a real gap: TLS alone does not stop a valid but compromised credential from reading the data once it's decrypted server-side.
Describe how to use Azure Policy to enforce resource-level constraints such as requiring an enforced 'cost-center' tag, permitted VM SKUs, and encryption at rest. Provide an example policy effect (Audit, Deny, DeployIfNotExists) for tagging and explain how to remediate existing non-compliant resources without breaking production.
Sample Answer
Direct answer
Azure Policy enforces resource-level rules declaratively: a policy definition states a condition and an effect, and an assignment applies it at a scope (management group, subscription, or resource group). For the three examples in the question: a required cost-center tag uses Deny (or Modify/DeployIfNotExists if you want to auto-remediate rather than just block) at creation time; permitted VM SKUs use Deny against any SKU outside an allowed list; encryption at rest is usually already enforced by the platform for many resource types, but where it is optional (some storage or database configurations), Audit or Deny verifies it is turned on. Remediating existing non-compliant resources without breaking production means using Audit first to find the population, then a scoped, reviewed remediation task (for tags) or a planned, tested change (for anything that risks an outage) rather than a blanket auto-fix.
Structured elaboration
The three effects asked about, and what each actually does.
- Audit: allows the operation to proceed but flags the resource as non-compliant in Policy's compliance dashboard. Zero risk of breaking anything, since nothing is blocked or changed; the trade-off is that non-compliant resources keep getting created until someone acts on the audit findings.
- Deny: blocks the create/update operation outright if it violates the condition. Effective for stopping new non-compliance immediately, but has zero effect on resources that already exist and already violate the rule; a
Denypolicy assigned today does not retroactively fix yesterday's resources. - DeployIfNotExists (DINE): after a resource is created or updated, checks whether a related resource or configuration exists (a diagnostic setting, an extension, a specific configuration) and if not, deploys it using a specified template, via a managed identity attached to the policy assignment. This is how you get "every VM automatically gets a monitoring agent" or "every storage account automatically gets a diagnostic setting pointed at the central workspace" without anyone manually configuring it per resource. (A close relative,
Modify, directly changes properties of the resource itself, such as adding or updating a tag, rather than deploying a related resource.)
Example: enforcing the cost-center tag. A Deny policy with a condition like field 'tags[cost-center]' exists 'false' blocks any new resource created without that tag, which is simple and effective for new resources but has the sharp edge that automation, IaC pipelines, or a team's existing deployment templates that do not set this tag will start failing outright the moment the policy is assigned, potentially in the middle of an unrelated urgent deployment. A more commonly recommended pattern for tags specifically is a Modify effect with DeployIfNotExists-style remediation: instead of blocking the create, automatically add a default cost-center value (e.g. unassigned) to any resource missing the tag, paired with a separate Audit policy or a Workbook that surfaces every resource still tagged unassigned for a human to correct later. This keeps deployments from breaking while still guaranteeing the tag is always present in some form.
Remediating existing non-compliant resources without breaking production. For a tag fix, this is low-risk: a Policy remediation task (built on the Modify or DeployIfNotExists effect) applies to the existing non-compliant population directly and adding or correcting a tag has no runtime impact on the resource. For something with real blast radius (how much could break, and how far the damage could spread, if the change goes wrong), such as retroactively enforcing a VM SKU restriction on VMs that are already running a now-disallowed SKU, do not remediate automatically: Deny going forward stops the bleeding, and existing non-compliant VMs go into a planned, scheduled migration (resize during a maintenance window, tested against the specific workload) rather than an automated remediation task that could resize or replace a running production VM without warning. The general rule: remediate automatically when the fix is purely metadata or purely additive (a missing diagnostic setting, a missing tag); remediate manually and deliberately when the fix changes the resource's actual runtime configuration or availability.
Permitted VM SKUs and encryption at rest. A SKU allowlist is typically a built-in policy (Allowed virtual machine SKUs) parameterized with your list, assigned with Deny. For encryption at rest, note that many Azure storage/database services encrypt at rest by default with platform-managed keys and cannot be turned off, so a policy here is more often about enforcing customer-managed keys where that's a compliance requirement, or catching a specific resource type where encryption is genuinely optional; check what the specific resource type's actual default is before writing a policy to enforce something that may already be non-optional.
Worked example
A subscription-scoped Deny policy definition targeting Microsoft.Compute/virtualMachines and Microsoft.Compute/virtualMachineScaleSets, condition not (field 'tags[cost-center]' exists 'true'), effect Deny, assigned to the subscription with an exemption for a specifically named "sandbox" resource group where short-lived experimentation is allowed to skip tagging. Rollout sequence to avoid breaking production: assign the same policy as Audit first for two weeks, review the compliance report to find every pipeline/team that would have been blocked, fix those pipelines' templates to include the tag, then flip the assignment to Deny. This order (Audit before Deny) is the single most reliable way to introduce a blocking policy without an unplanned outage caused by the policy itself.
Trade-offs and pitfalls
Deny policies assigned without an Audit-first rollout are the most common source of "why did my deployment suddenly start failing" incidents in a governed environment, especially when the policy is assigned at a management-group scope covering many subscriptions a central platform team does not operate day-to-day. DeployIfNotExists remediation runs under a system-assigned managed identity with specific role assignments granted at policy-assignment time; forgetting to grant that identity the roles its remediation template actually needs is a common, silent failure mode where the policy shows resources as "non-compliant, remediation in progress" indefinitely because the identity cannot actually perform the deployment. Finally, policies stack: a resource can be subject to policies assigned at the management group, the subscription, and the resource group simultaneously, and the most restrictive Deny anywhere in that chain wins, which means testing a new policy's effect at the exact scope and resource types it will actually apply to, not just in isolation, matters before a wide rollout.
Architect a secure multi-tenant SaaS platform on Azure. Cover tenant isolation options (shared schema with tenant IDs, schema-per-tenant, DB-per-tenant), authentication and authorization using Azure AD (multi-tenant app vs tenant-isolated apps), encryption and key management via Key Vault (per-tenant keys vs shared key), and compliance needs such as audit logging and tenant-scoped RBAC.
Sample Answer
Direct answer
Do not pick one tenant-isolation model for the whole platform: default new, low-risk tenants to a shared schema with a tenant identifier column for cost efficiency, and give high-risk or high-revenue tenants their own schema or database, automated through the same provisioning pipeline. Authenticate through a single multi-tenant Microsoft Entra ID (Azure's cloud identity and directory service) application so the product has one codebase and one identity model, encrypt with per-tenant keys in Key Vault wherever the tenant's contract requires it, and put the tenant identifier in every log line and every role check so isolation is enforced at every layer, not just in the database.
Structured elaboration
Tenant isolation, compared.
| Model | Isolation strength | Cost and ops overhead | When to use |
|---|---|---|---|
| Shared schema, tenant identifier column | Weakest: a single bug in a query's filter can leak across tenants | Lowest: one database serves all tenants | Many small, low-risk tenants where cost per tenant must stay near zero |
| Schema-per-tenant | Stronger logical isolation; per-tenant backup and restore is straightforward | Moderate: schema count grows with tenant count inside one database server | Mid-tier tenants needing better isolation without full database overhead |
| Database-per-tenant | Strongest: a tenant's data physically cannot leak into another tenant's queries; can place the database in the tenant's required region | Highest: connection limits, per-database cost, and operational overhead scale with tenant count | High-risk, regulated, or high-revenue tenants, or any tenant with its own data-residency requirement |
Authentication and authorization. A single multi-tenant Microsoft Entra ID application registration lets any organization's users sign in with an admin-consent flow, keeping one codebase and one permission model; include the tenant identifier and role claims directly in the issued token so the application never has to look them up separately on every request. Reserve fully tenant-isolated app registrations for the rare case where a specific enterprise customer contractually requires their own application object; it is stronger administrative separation at real operational cost, since every tenant-isolated app needs its own lifecycle management.
Encryption and key management, per-tenant versus shared. A shared customer-managed key is simpler to operate but means every tenant's blast radius is the same key; a per-tenant key in Key Vault or Managed HSM lets you revoke or rotate one tenant's access independently and supports contractual bring-your-own-key requirements, at the cost of managing one key lifecycle per tenant. Use envelope encryption (a per-record data key wrapped by the tenant's key) so rotating a tenant's key never means re-encrypting that tenant's entire dataset.
Per-tenant network segmentation. For the tenants on database-per-tenant isolation, extend the segmentation past the database itself: place each such tenant's data store behind its own private endpoint and restrict the application tier's outbound rules so one tenant's compute path cannot reach another tenant's database subnet even if application-layer isolation were ever bypassed. This defense-in-depth layer is what keeps a single application-tier bug from becoming a cross-tenant data breach.
Compliance: audit logging and tenant-scoped role-based access control (RBAC). Every log line, from application telemetry to Key Vault access logs, carries the tenant identifier, so a single query can produce a tenant's complete audit trail on request, which is what most compliance frameworks and enterprise customer contracts actually ask for. Implement tenant admin roles as application-level roles backed by Microsoft Entra ID groups, and log every administrative action (a tenant admin changing another user's permissions, for example) to an append-only store.
Admin and provisioning automation. Automate tenant onboarding end to end through Infrastructure as Code (a template or module invoked by the provisioning pipeline, not a manual runbook): create the schema or database, create the tenant's Key Vault key if per-tenant encryption applies, provision the network segmentation if the tenant is on database-per-tenant isolation, and seed the default roles, all from one pipeline run so a human never has to remember every step for every new tenant.
flowchart TD
U[User] --> ENTRA[Microsoft Entra ID: multi-tenant app]
ENTRA --> API[API layer: reads tenant_id + role from token]
API --> POLICY[Tenant-scoped RBAC check]
POLICY --> SHARED[Shared-schema tenants]
POLICY --> DEDICATED[Database-per-tenant, private endpoint]
SHARED --> KVSHARED[Shared CMK in Key Vault]
DEDICATED --> KVPT[Per-tenant key in Key Vault]
Worked example
Trace a new enterprise customer's onboarding that contractually requires a dedicated database and its own encryption key from day one. The provisioning pipeline receives the signup event, creates a dedicated database in the tenant's required region, creates a new Key Vault key scoped to that tenant, provisions a private endpoint restricting network access to that database, provisions a Microsoft Entra ID security group for the tenant's admins, and seeds the tenant's default roles, all as one automated run rather than a manual checklist. Contrast that with the more common growth path: a different, existing tenant that started on the shared schema six months earlier outgrows it and signs a contract requiring dedicated isolation. For that tenant, the same pipeline runs its migration path instead of its onboarding path: it copies the tenant's rows out of the shared schema into a newly created dedicated database, re-encrypts them under a newly created per-tenant key, cuts the application over to the new connection string, and only then decommissions the tenant's rows from the shared schema, all without touching any other tenant's data or downtime for other tenants still sharing the original database.
Trade-offs & pitfalls
The pitfall that shows up most in real platforms is picking one isolation model up front and being unable to move a tenant later without a painful, bespoke migration; build the migration path (shared to dedicated) as a first-class, tested capability from day one, not an emergency project when the first enterprise customer signs a contract requiring it. The second is treating a shared customer-managed key as good enough for every tenant by default; the moment one enterprise contract requires an independently revocable key, retrofitting per-tenant keys onto an architecture that never planned for them is significantly harder than building the per-tenant key path from the start, even if most tenants never use it.
You must ensure customer data is stored only in EU regions to meet GDPR requirements. Design Azure architecture and controls for storage, databases, backups, Key Vault keys, and logs to enforce data residency. Include automated enforcement using Azure Policy, tagging conventions, access controls, and audit trails to demonstrate compliance.
Sample Answer
Direct answer
Enforce European Union (EU) data residency preventively with Azure Policy denying any resource creation, replication target, or diagnostic destination outside an approved EU region list, detect drift with continuous compliance scanning, and produce an auditable trail (policy compliance reports plus immutable log exports) that proves it rather than merely asserting it. In plain terms for a non-technical stakeholder: nothing that stores, backs up, encrypts, or logs your data is allowed to exist outside the EU, and the platform checks this automatically every time something is deployed, not just when someone remembers to look.
Structured elaboration
Governance boundary. Group every subscription that may hold customer data under a single Azure management group ("EU-Data"), and assign the enforcement policies at that management group so no subscription inside it can opt out individually.
Core Azure Policy controls, as one initiative.
- Deny resource creation outside an explicit list of EU regions (a built-in "allowed locations" policy).
- Deny storage or database configurations whose replication target falls outside that same EU list. In practice this control matters most for services where an administrator explicitly chooses the secondary region, such as Cosmos DB's global distribution or SQL Database active geo-replication, since those accept any region, paired or not: an admin adding UK South as a secondary read region (the United Kingdom left the EU and is not covered by an EU-only residency policy) is a real, common way personal data leaves the boundary. Azure Storage's own geo-redundant replication is different: Microsoft fixes the GRS secondary to a deliberately same-geography paired region (for example, West Europe pairs with North Europe, and both are EU member states), so GRS on an EU primary does not by itself put data outside the EU; the policy still needs to check it because a future or reconfigured pairing could change, but the risk is concentrated in the services that let an operator pick an arbitrary region.
- Require a small tagging convention on every relevant resource, not a single flag: data-residency (EU), data-classification (personal-data or non-personal), and owner, all enforced by policy with automatic remediation to append the standard values where it is safe to do so, and denied creation where a human would otherwise have to guess the right value.
- Require diagnostic settings to export logs only to EU-based Log Analytics workspaces or storage accounts.
- Require Key Vault instances to sit in an EU region with soft-delete and purge protection enabled.
Storage, database, backup, and key placement. Restrict creation location for storage accounts, Cosmos DB, and relational databases to the approved EU list. For geo-redundancy, choose only EU-to-EU region pairs; if the only available paired region for a given service crosses outside the EU, that is a deliberate architecture exception requiring documented approval, not a default configuration. Recovery Services vaults for backup must themselves be created in an EU region, since a backup vault outside the residency boundary would defeat the whole control even if the primary data never left. Encryption keys used for customer-managed encryption live in an EU Key Vault or Managed HSM, so decryption capability itself never exists outside the boundary.
Logs and audit trails. Route Activity Logs and every resource's diagnostic logs to EU-based Log Analytics and, where a security information and event management (SIEM) tool is used, an EU-based Microsoft Sentinel workspace. Apply immutability policies to the log storage so the audit trail itself cannot be altered after the fact, which is what actually lets you prove compliance to a regulator rather than merely claim it.
Data deletion pathways (the right-to-erasure requirement). A residency control only proves where data lives, not that it can be removed on request, and General Data Protection Regulation (GDPR) includes a right to erasure. Build an explicit deletion workflow that removes a data subject's records from the primary store and propagates that deletion through every EU replica and every backup's retention policy, with a completion record logged to the same immutable audit trail used for residency evidence, so a single workflow answers both "where is this data" and "can you actually delete it."
Pseudonymization for cross-border analytics. Raw, identifiable customer data stays inside the EU boundary under the controls above. Where the business genuinely needs cross-border aggregate analytics (for example, a global reporting dashboard), pseudonymize or aggregate the data before it leaves the EU boundary, so what crosses the border is no longer personal data under GDPR's definition; this is a materially different (and defensible) design from simply replicating raw customer records to a non-EU analytics region, which the policy set above blocks entirely and correctly so.
flowchart TD
MG[Management group: EU-Data] --> POL[Azure Policy initiative: allowed EU regions, tag, diagnostics, KV]
POL --> ST[Storage and databases, EU only]
POL --> KV[Key Vault or Managed HSM, EU only]
POL --> LOG[Log Analytics, EU only]
ST --> BACKUP[Backup vaults, EU only]
LOG --> AUDIT[Immutable audit trail]
ANON[Pseudonymization step] --> GLOBAL[Cross-border aggregate analytics]
ST --> ANON
Worked example
Trace a specific policy catch: an engineer configures a Cosmos DB account's global distribution and adds UK South as an additional read region, intending only to widen availability for a nearby customer base. UK South is not an EU region (the United Kingdom left the EU in 2020), even though it sits in the same general part of the region list as the EU regions the account already uses. The custom policy inspecting each configured region against the approved EU list denies the deployment outright, with a message naming the specific non-compliant region, rather than allowing it to succeed and only catching the violation in a later audit. The engineer removes UK South and adds an EU region instead, and the deployment succeeds; this is the preventative control working as designed, not the detective control catching a mistake after data has already left the boundary. Note that Azure Storage's own GRS would not have produced this exact failure mode on a West Europe account, since its automatic secondary is North Europe, itself in the EU; the preventative check earns its keep specifically on services like Cosmos DB and SQL Database where the secondary region is a free choice, not a fixed pairing.
Trade-offs & pitfalls
The recurring pitfall seen in real incidents is checking only the primary resource's region and missing its replication target, backup vault, or log destination, each of which is a separate place personal data can end up outside the EU even when the primary looks compliant. The second is conflating pseudonymized aggregate data with raw customer data when deciding what can cross the border; the moment an aggregate can be re-identified (a small enough cohort, or a join back to an identifiable source), it is personal data again and the residency controls apply to it just the same.
Unlock Full Question Bank
Get access to all 20 Microsoft Azure Services and Architecture interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.