MongoDB Atlas on Azure

MongoDB Atlas on Azure — Networking, Identity & Integration

Deep reference for MongoDB Atlas on Microsoft Azure covering Private Link and DNS architecture, Entra ID OIDC/LDAP identity federation and Managed Identity for Atlas authentication, Azure Key Vault BYOK encryption with key rotation and failsafe behavior, Atlas Kubernetes Operator on AKS with Workload Identity, Azure service integrations (OpenAI, Event Hub, Functions, App Service, Container Apps, Synapse), MACC and Azure Native MongoDB billing, Azure Monitor / Log Analytics / Sentinel observability, the complete Azure region map, Terraform and Bicep IaC patterns, and a full Azure-specific troubleshooting playbook.

When to use this skill

1. Azure Networking with Atlas

MongoDB recommends Private Endpoints (Azure Private Link) for new deployments over VNet peering.

Private Link DNS: SRV connection string resolves to pl-0-eastus2.<cluster-id>.mongodb.net — an A record pointing to the NIC’s private IP. Private DNS Zone <cluster-id>.mongodb.net must be linked to every VNet needing resolution.

NSG Rules: SRV connection strings use high ports (1024-65535), not just 27017. Allow TCP 1024-65535 outbound to private endpoint subnet.

Hub-and-spoke: Place private endpoint in hub VNet; use Azure Private DNS Resolver (managed, HA) instead of BIND forwarder VMs. Link Private DNS Zone to ALL VNets including spokes.

2. Azure Active Directory (Entra ID) + Atlas

Workforce Identity Federation (OIDC) — GA June 2024

Human users SSO into Atlas database access using Entra ID credentials. Issuer URI: https://login.microsoftonline.com/<tenant-id>/v2.0.

Workload Identity Federation (OAuth 2.0) — GA June 2024

Azure Managed Identities and Service Principals authenticate to Atlas without passwords using short-lived OAuth 2.0 tokens. Issuer URI: https://sts.windows.net/<tenant-id>/.

AKS Workload Identity

Add label azure.workload.identity/use: "true" to pod. Create federated credential linking AKS OIDC issuer + service account + audience api://AzureADTokenExchange.

3. Azure Key Vault and Encryption at Rest

Atlas uses its own Azure Service Principal (atlasAzureAppId: 9efedfcc-2eca-4b27-a613-0cad1e114cb7). Grant it “Key Vault Crypto User” and “Reader” RBAC roles.

Key Identifier Best Practice

Use versionless key identifier (no trailing /<version>) so Atlas automatically uses the latest key version after rotation.

Failsafe Behavior

If AKV is inaccessible: running cluster continues (DEK cached in memory), but mongod will NOT restart. Create private endpoint for KV in EACH Atlas-deployed region.

4. Azure Native Service Integrations

Azure Functions + Atlas

Use maxPoolSize: 5 (low pool for horizontal scaling). Cold starts create new connections. Do NOT store client in async context — use module-level singleton.

Azure Event Hub + Atlas Stream Processing

Supported via Kafka-compatible endpoint. Standard tier: 20 consumer groups per hub. Each Atlas Stream Processor = 1 consumer group. Upgrade to Premium for many pipelines.

Flagship integration as of 2024-2025. Azure OpenAI “on your data” has a native MongoDB Atlas data connector (API version 2024-08-01+).

5. MACC and Azure Marketplace Billing

MACC-eligible: Atlas purchased through Azure Marketplace (PAYG or committed-use). Direct MongoDB invoices are NOT MACC-eligible.

ANM (Azure Native MongoDB): Atlas as a first-party Azure resource type in Azure Portal. Billing on Azure invoice. Feature parity generally at parity with standard Atlas.

6. Azure Monitoring and Observability

7. Atlas → Azure Region Mapping (Key Regions)

Atlas Region Azure Display Name Azure Code
AZURE_EASTUS East US eastus
AZURE_EASTUS2 East US 2 eastus2
AZURE_WESTUS2 West US 2 westus2
AZURE_NORTHEUROPE North Europe northeurope
AZURE_WESTEUROPE West Europe westeurope
AZURE_UKSOUTH UK South uksouth
AZURE_JAPANEAST Japan East japaneast
AZURE_AUSTRALIAEAST Australia East australiaeast

AtlasGov (FedRAMP High): AZURE_US_GOV_VIRGINIA, AZURE_US_GOV_ARIZONA. Control plane: cloud.mongodbgov.com.

8. IaC Patterns: Terraform + Bicep

Use mongodbatlas provider v2.x + azurerm provider v3.x. For Private Endpoint: 4-step pattern — create Atlas endpoint service → Azure private endpoint → register with Atlas → create Private DNS Zone + VNet link + A record.

For Key Vault EAR: use versionless_id for the key identifier to enable automatic rotation pickup.

9. Troubleshooting Playbook

Common Anti-Patterns

References