For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Unsupported Commands in Atlas Clusters

This page compares command support for Free clusters, Flex clusters, M10+ Atlas Core clusters, and M10+ Atlas Infinite clusters in the following sections:

Atlas requires clients to authenticate to access an Atlas cluster. Atlas provides a curated list of Database User Privileges that grant access to a subset of MongoDB commands. The tables in the Unsupported Commands section list the commands that fall outside this subset for each cluster type.

Atlas Free, Flex, and Infinite clusters don't support all functionality available to other clusters. To learn more, see:

The following tables list the MongoDB commands, shell methods, and privilege actions that Atlas doesn't support, by cluster type. To ensure cluster stability and performance, Atlas automates the functionality that these commands provide. Atlas restricts other commands based on a cluster's tier or database edition.

A indicates that the cluster type doesn't support the command.

Note

If you use an unsupported command or invalid syntax in Free clusters and Flex clusters, Atlas returns the following error message:

<$command> is not allowed or the syntax is incorrect,
see the Atlas documentation for more information.

To learn more about valid syntax, see Database Commands

Command
Shell Method
Privilege Actions
Free and Flex
M10+ Core
M10+ Infinite

shardedFinish

Command
Shell Method
Privilege Actions
Free and Flex
M10+ Core
M10+ Infinite

copydbgetnonce

copydbsaslstart

Command
Shell Method
Privilege Actions
Free and Flex
M10+ Core
M10+ Infinite

currentOpCtx

forcerror

getDiagnosticData

getPrevError

handshake

Command
Shell Method
Privilege Actions
Free and Flex
M10+ Core
M10+ Infinite

planCacheListPlans

planCacheListQueryShapes

Command
Shell Method
Privilege Actions
Free and Flex
M10+ Core
M10+ Infinite
[1](1, 2) You can use setAllowMigrations to control the balancing of a specific collection.
[2] This command is not supported on global write clusters only.

Note

As an alternative, see the available Atlas User Roles.

[3](1, 2) You can call getUser for your own user account.

Atlas doesn't support the following command line tool options. A indicates that the cluster type doesn't support the option.

Atlas supports the following commands with limits.

You can run the following commands with limits in Free clusters and Flex clusters:

Command
Limit
  • Doesn't support the $where operator.

  • Limits the count operation on the local database to the system.replset and oplog.rs collections.

Free clusters and Flex clusters don't allow the dbStats command on the local and config databases.

To learn more, see Operational Limits.

Doesn't support $where operator.

  • Doesn't support the $where operator.

  • Doesn't support the $$USER_ROLES system variable.

  • Ignores the allowDiskUse parameter.

  • Limits the find operation on the local database to the oplog.rs collection.

  • Limits the find operation to using an equality condition when querying the ns field in the oplog.rs collection on the local database.

    { "ns" : "test.foo" }

Limits execution to these two documents:

  • { "getParameter": 1, "authSchemaVersion": 1 }

  • { "getParameter": 1, "authenticationMechanisms": 1 }

Limits the db.killOp() method to the MongoDB user who ran the operation.

Doesn't support the $$USER_ROLES system variable.

Doesn't support the $$USER_ROLES system variable.

Doesn't support the $$USER_ROLES system variable.

Limits response to the following fields:

  • $clusterTime.clusterTime

  • $clusterTime.operationTime

  • $clusterTime.signature.hash

  • $clusterTime.signature.keyId

  • $clusterTime.signature

  • asserts.msg

  • asserts.regular

  • asserts.rollovers

  • asserts.user

  • asserts.warning

  • atlasVersion.gitVersion

  • atlasVersion.version

  • connections.available

  • connections.current

  • connections.totalCreated

  • extra_info.note

  • extra_info.page_faults

  • host

  • localTime

  • mem.bits

  • mem.mapped

  • mem.mappedWithJournal

  • mem.resident

  • mem.supported

  • mem.virtual

  • metrics.atlas.bytesInWrites

  • metrics.atlas.connectionPool.totalCreated

  • network.bytesIn

  • network.bytesOut

  • network.numRequests

  • ok

  • opcounters.command

  • opcounters.delete

  • opcounters.getmore

  • opcounters.insert

  • opcounters.query

  • opcounters.update

  • opcountersRepl.command

  • opcountersRepl.delete

  • opcountersRepl.getmore

  • opcountersRepl.insert

  • opcountersRepl.query

  • opcountersRepl.update

  • pid

  • process

  • repl.electionId

  • repl.hosts[]

  • repl.ismaster

  • repl.lastWrite.lastWriteDate

  • repl.lastWrite.majorityOpTime.t

  • repl.lastWrite.majorityOpTime.ts

  • repl.lastWrite.majorityWriteDate

  • repl.lastWrite.opTime.t

  • repl.lastWrite.opTime.ts

  • repl.me

  • repl.primary

  • repl.rbid

  • repl.secondary

  • repl.setName

  • repl.setVersion

  • repl.tags.nodeType

  • repl.tags.provider

  • repl.tags.region

  • repl.tags

  • storageEngine.backupCursorOpen

  • storageEngine.dropPendingIdents

  • storageEngine.name

  • storageEngine.oldestRequiredTimestampForCrashRecovery

  • storageEngine.persistent

  • storageEngine.readOnly

  • storageEngine.supportsCommittedReads

  • storageEngine.supportsPendingDrops

  • storageEngine.supportsSnapshotReadConcern

  • uptime

  • uptimeEstimate

  • uptimeMillis

  • version

Atlas limits the db.killOp() method to the MongoDB user who ran the operation.

Atlas doesn't support the killAllSessions command unless the database user has:

Atlas supports the following sharding commands on only M30+ sharded Atlas Core clusters.

Atlas limits the db.killOp() method to the MongoDB user who ran the operation.

Atlas doesn't support the killAllSessions command unless the database user has:

Atlas Infinite clusters only support the profile command when the database profiler level is 0.

Contact Atlas support if your use case requires access to a command that the Atlas database user privileges don't currently support.