-Before you audit the control plane operations in Azure Cosmos DB, disable the key-based metadata write access on your account. When key based metadata write access is disabled, clients connecting to the Azure Cosmos account through account keys are prevented from accessing the account. You can disable write access by setting the `disableKeyBasedMetadataWriteAccess` property to true. After you set this property, changes to any resource can happen from a user with the proper Role-based access control(RBAC) role and credentials. To learn more on how to set this property, see the [Preventing changes from SDKs](role-based-access-control.md#preventing-changes-from-cosmos-sdk) article. Once this option - disableKeyBasedMetadataWriteAccess - is switched on - SDK based clients will see an error "Operation 'POST' on resource 'ContainerNameorDatabaseName' is not allowed through Azure Cosmos DB endpoint. Please switch on such operations for your account, or perform this operation through Azure Resource Manager, Azure CLI or Azure Powershell. The way to switch back is to reset disableKeyBasedMetadataWriteAccess to false using CLI as described [here](role-based-access-control.md#preventing-changes-from-cosmos-sdk) - remember to change true to false in the cli command.
0 commit comments