Share via

Azure DocumentDB (with MongoDB compatibility) Preview Feature Provisioning

Andrew McCrary 20 Reputation points
2026-04-21T16:24:08.7033333+00:00

Hello,

Two questions:

  1. How can I enable the change stream preview feature for documentdb with mongodb compatibility? Relevant az cli documentation doesn't seem to specify https://learn.microsoft.com/en-us/cli/azure/cosmosdb/mongocluster?view=azure-cli-latest#az-cosmosdb-mongocluster-update
  2. Does enabling this feature require the cluster to restart? Similarly, I can't find documentation on this.

I'm on the vcore version of this resource, not RU - not sure if that's relevant or not.

Azure Cosmos DB
Azure Cosmos DB

An Azure NoSQL database service for app development.

0 comments No comments

Answer accepted by question author

  1. Q&A Assist
    2026-04-21T16:24:25.0166667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more
    1. To enable the Change Streams preview feature for Azure DocumentDB (with MongoDB compatibility, vCore): Change Streams are enabled at the cluster level via the previewFeatures property on the Microsoft.DocumentDB/mongoClusters resource using the Azure CLI generic az resource commands with the 2024-10-01-preview API. Steps:
      1. Sign in to Azure CLI:
              az login
        
      2. Retrieve the current cluster settings so existing feature flags are preserved:
              az resource show \
                --ids "/subscriptions/<sub id>/resourceGroups/<resource group name>/providers/Microsoft.DocumentDB/mongoClusters/<cluster-name>" \
                --api-version 2024-10-01-preview
        
      3. Enable Change Streams by patching the cluster and setting previewFeatures to include "ChangeStreams":
              az resource patch \
                --ids "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.DocumentDB/mongoClusters/<cluster-name>" \
                --api-version 2024-10-01-preview \
                --properties "{\"previewFeatures\": [ \"ChangeStreams\"]}"
        
      4. Verify that the response contains:
              "previewFeatures": ["ChangeStreams"]
        
      If the operation returns an error such as "change streams isn't supported on this cluster," a support request is required to have the feature enabled for that cluster. This applies to Azure DocumentDB (vCore) clusters (formerly Azure Cosmos DB for MongoDB vCore), which are represented by the mongoClusters resource type.
    2. Regarding whether enabling this feature requires a cluster restart: The provided documentation for enabling Change Streams via the previewFeatures flag does not state that a cluster restart is required or performed as part of enabling the feature. It only describes enabling the feature through an ARM/CLI PATCH operation and verifying the previewFeatures property. No restart requirement or behavior is documented in the referenced material.

    References:

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.