> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

# Unsupported Commands in Atlas

## Unsupported Commands in M0 and Atlas Flex Clusters

Atlas Free clusters and Flex clusters don't support all functionality available to other clusters. To learn more about `M0` cluster limits, see [Atlas Free Cluster Limits](https://www.mongodb.com/docs/atlas/reference/free-shared-limitations.md#std-label-atlas-free-tier). To learn more about Flex cluster limits, see [Atlas Flex Limitations.](https://www.mongodb.com/docs/atlas/reference/flex-limitations.md#std-label-flex-cluster-limitations)

**Note:**

If you use an unsupported command or invalid syntax, Atlas returns the following error message:

```shell
 <$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](https://www.mongodb.com/docs/manual/reference/command/)

### Limited Commands

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

| Command | Limit |
| --- | --- |
| [`aggregate`](https://www.mongodb.com/docs/manual/reference/command/aggregate.md#mongodb-dbcommand-dbcmd.aggregate) | Limits the `maxTimeMs` parameter to 300 seconds (`300000`).; Ignores the [allowDiskUse](https://www.mongodb.com/docs/manual/reference/command/aggregate/#std-label-aggregate-cmd-allowDiskUse) parameter.; Doesn't support [$accumulator](https://www.mongodb.com/docs/manual/reference/operator/aggregation/accumulator/) and [$function](https://www.mongodb.com/docs/manual/reference/operator/aggregation/function/) operators.; Doesn't support the [$$USER_ROLES](https://www.mongodb.com/docs/manual/reference/aggregation-variables/#mongodb-variable-variable.USER_ROLES) system variable. |
| [`count`](https://www.mongodb.com/docs/manual/reference/command/count.md#mongodb-dbcommand-dbcmd.count) | Doesn't support the [`$where`](https://www.mongodb.com/docs/manual/reference/operator/query/where.md#mongodb-query-op.-where) operator.; Limits the [`count`](https://www.mongodb.com/docs/manual/reference/command/count.md#mongodb-dbcommand-dbcmd.count) operation on the `local` database to the `system.replset` and  `oplog.rs` collections. |
| [`dbStats`](https://www.mongodb.com/docs/manual/reference/command/dbStats.md#mongodb-dbcommand-dbcmd.dbStats) | Free clusters and Flex clusters don't allow the [`dbStats`](https://www.mongodb.com/docs/manual/reference/command/dbStats.md#mongodb-dbcommand-dbcmd.dbStats) command on the `local` and `config` databases. To learn more, see [Operational Limits.](https://www.mongodb.com/docs/atlas/reference/free-shared-limitations.md#std-label-shared-limits-ops) |
| [`distinct`](https://www.mongodb.com/docs/manual/reference/command/distinct.md#mongodb-dbcommand-dbcmd.distinct) | Doesn't support [`$where`](https://www.mongodb.com/docs/manual/reference/operator/query/where.md#mongodb-query-op.-where) operator. |
| [`find`](https://www.mongodb.com/docs/manual/reference/command/find.md#mongodb-dbcommand-dbcmd.find) | Doesn't support the [`$where`](https://www.mongodb.com/docs/manual/reference/operator/query/where.md#mongodb-query-op.-where) operator.; Doesn't support the [$$USER_ROLES](https://www.mongodb.com/docs/manual/reference/aggregation-variables/#mongodb-variable-variable.USER_ROLES) system variable.; Ignores the [allowDiskUse](https://www.mongodb.com/docs/manual/reference/command/find/#std-label-find-cmd-allowDiskUse) parameter.; Limits the [`find`](https://www.mongodb.com/docs/manual/reference/command/find.md#mongodb-dbcommand-dbcmd.find) operation on the `local` database to the `oplog.rs` collection.; Limits the [`find`](https://www.mongodb.com/docs/manual/reference/command/find.md#mongodb-dbcommand-dbcmd.find) operation to using an equality condition when querying the `ns` field in the `oplog.rs` collection on the `local` database.`{ "ns" : "test.foo" }` |
| [`getParameter`](https://www.mongodb.com/docs/manual/reference/command/getParameter.md#mongodb-dbcommand-dbcmd.getParameter) | Limits execution to these two documents: `{ "getParameter": 1, "authSchemaVersion": 1 }`; `{ "getParameter": 1, "authenticationMechanisms": 1 }` |
| [`db.killOp()`](https://www.mongodb.com/docs/manual/reference/method/db.killOp.md#mongodb-method-db.killOp) | Limits the [`db.killOp()`](https://www.mongodb.com/docs/manual/reference/method/db.killOp.md#mongodb-method-db.killOp) method to the MongoDB user who ran the operation. |
| [`collection.updateOne()`](https://www.mongodb.com/docs/atlas/atlas-ui/triggers/functions/api.md#mongodb-method-collection.updateOne) | Doesn't support the [$$USER_ROLES](https://www.mongodb.com/docs/manual/reference/aggregation-variables/#mongodb-variable-variable.USER_ROLES) system variable. |
| [`collection.updateMany()`](https://www.mongodb.com/docs/atlas/atlas-ui/triggers/functions/api.md#mongodb-method-collection.updateMany) | Doesn't support the [$$USER_ROLES](https://www.mongodb.com/docs/manual/reference/aggregation-variables/#mongodb-variable-variable.USER_ROLES) system variable. |
| [`findAndModify`](https://www.mongodb.com/docs/manual/reference/command/findAndModify.md#mongodb-dbcommand-dbcmd.findAndModify) | Doesn't support the [$$USER_ROLES](https://www.mongodb.com/docs/manual/reference/aggregation-variables/#mongodb-variable-variable.USER_ROLES) system variable. |
| [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-dbcommand-dbcmd.serverStatus) | 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` |

### Unsupported Commands

Free clusters and Flex clusters don't support the following commands:

**Note:**

The commands available for clusters of all other tiers, M10 and larger, correspond to the privileges defined for the built-in Atlas MongoDB roles. To learn more about permissions, see [Atlas User Privileges.](https://www.mongodb.com/docs/manual/reference/built-in-roles.md#std-label-atlas-user-privileges)

- `_migrateClone`

- `_recvChunkAbort`

- `_recvChunkCommit`

- `_recvChunkStart`

- `_recvChunkStatus`

- `_transferMods`

- [`appendOplogNote`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-appendOplogNote)

- [`applyOps`](https://www.mongodb.com/docs/manual/reference/command/applyOps.md#mongodb-dbcommand-dbcmd.applyOps)

- [`authenticate`](https://www.mongodb.com/docs/manual/reference/command/authenticate.md#mongodb-dbcommand-dbcmd.authenticate)

- [`autoCompact`](https://www.mongodb.com/docs/manual/reference/command/autoCompact.md#mongodb-dbcommand-dbcmd.autoCompact)

- [`authSchemaUpgrade`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-authSchemaUpgrade)

- [`cleanupOrphaned`](https://www.mongodb.com/docs/manual/reference/command/cleanupOrphaned.md#mongodb-dbcommand-dbcmd.cleanupOrphaned)

- `cloneCollection`

- [`cloneCollectionAsCapped`](https://www.mongodb.com/docs/manual/reference/command/cloneCollectionAsCapped.md#mongodb-dbcommand-dbcmd.cloneCollectionAsCapped)

- [`compact`](https://www.mongodb.com/docs/manual/reference/command/compact.md#mongodb-dbcommand-dbcmd.compact)

- `copydbgetnonce`

- `copydbsaslstart`

- [`createRole`](https://www.mongodb.com/docs/manual/reference/command/createRole.md#mongodb-dbcommand-dbcmd.createRole)

- [`db.collection.getSearchIndexes()`](https://www.mongodb.com/docs/manual/reference/method/db.collection.getSearchIndexes.md#mongodb-method-db.collection.getSearchIndexes)

- [`createUser`](https://www.mongodb.com/docs/manual/reference/command/createUser.md#mongodb-dbcommand-dbcmd.createUser)

- `currentOpCtx`

- [`dataSize`](https://www.mongodb.com/docs/manual/reference/command/dataSize.md#mongodb-dbcommand-dbcmd.dataSize)

- [`dbHash`](https://www.mongodb.com/docs/manual/reference/command/dbHash.md#mongodb-dbcommand-dbcmd.dbHash)

- [`dropAllRolesFromDatabase`](https://www.mongodb.com/docs/manual/reference/command/dropAllRolesFromDatabase.md#mongodb-dbcommand-dbcmd.dropAllRolesFromDatabase)

- [`dropAllUsersFromDatabase`](https://www.mongodb.com/docs/manual/reference/command/dropAllUsersFromDatabase.md#mongodb-dbcommand-dbcmd.dropAllUsersFromDatabase)

- [`dropConnections`](https://www.mongodb.com/docs/manual/reference/command/dropConnections.md#mongodb-dbcommand-dbcmd.dropConnections)

- [`dropRole`](https://www.mongodb.com/docs/manual/reference/command/dropRole.md#mongodb-dbcommand-dbcmd.dropRole)

- `enableFreeMonitoring`

- `forcerror`

- [`fsync`](https://www.mongodb.com/docs/manual/reference/command/fsync.md#mongodb-dbcommand-dbcmd.fsync)

- [`fsyncUnlock`](https://www.mongodb.com/docs/manual/reference/command/fsyncUnlock.md#mongodb-dbcommand-dbcmd.fsyncUnlock)

- `getDiagnosticData`

- `getPrevError`

- [`getShardMap`](https://www.mongodb.com/docs/manual/reference/command/getShardMap.md#mongodb-dbcommand-dbcmd.getShardMap)

- [`grantPrivilegesToRole`](https://www.mongodb.com/docs/manual/reference/command/grantPrivilegesToRole.md#mongodb-dbcommand-dbcmd.grantPrivilegesToRole)

- [`grantRolesToRole`](https://www.mongodb.com/docs/manual/reference/command/grantRolesToRole.md#mongodb-dbcommand-dbcmd.grantRolesToRole)

- [`grantRolesToUser`](https://www.mongodb.com/docs/manual/reference/command/grantRolesToUser.md#mongodb-dbcommand-dbcmd.grantRolesToUser)

- `handshake`

- [`hostInfo`](https://www.mongodb.com/docs/manual/reference/command/hostInfo.md#mongodb-dbcommand-dbcmd.hostInfo)

- [`invalidateUserCache`](https://www.mongodb.com/docs/manual/reference/command/invalidateUserCache.md#mongodb-dbcommand-dbcmd.invalidateUserCache)

- [`killAllSessions`](https://www.mongodb.com/docs/manual/reference/command/killAllSessions.md#mongodb-dbcommand-dbcmd.killAllSessions)

- [`killAllSessionsByPattern`](https://www.mongodb.com/docs/manual/reference/command/killAllSessionsByPattern.md#mongodb-dbcommand-dbcmd.killAllSessionsByPattern)

- [`killAnySession`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-killAnySession)

- [`killSessions`](https://www.mongodb.com/docs/manual/reference/command/killSessions.md#mongodb-dbcommand-dbcmd.killSessions)

- [`$listLocalSessions`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/listLocalSessions.md#mongodb-pipeline-pipe.-listLocalSessions)

- [`$listSessions`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/listSessions.md#mongodb-pipeline-pipe.-listSessions)

- [`lockInfo`](https://www.mongodb.com/docs/manual/reference/command/lockInfo.md#mongodb-dbcommand-dbcmd.lockInfo)

- [`logRotate`](https://www.mongodb.com/docs/manual/reference/command/logRotate.md#mongodb-dbcommand-dbcmd.logRotate)

- [`logApplicationMessage`](https://www.mongodb.com/docs/manual/reference/command/logApplicationMessage.md#mongodb-dbcommand-dbcmd.logApplicationMessage)

- `shardedFinish`

- [`mapReduce`](https://www.mongodb.com/docs/manual/reference/command/mapReduce.md#mongodb-dbcommand-dbcmd.mapReduce)

- [`planCacheClear`](https://www.mongodb.com/docs/manual/reference/command/planCacheClear.md#mongodb-dbcommand-dbcmd.planCacheClear)

- [`planCacheClearFilters`](https://www.mongodb.com/docs/manual/reference/command/planCacheClearFilters.md#mongodb-dbcommand-dbcmd.planCacheClearFilters)

- [`planCacheListFilters`](https://www.mongodb.com/docs/manual/reference/command/planCacheListFilters.md#mongodb-dbcommand-dbcmd.planCacheListFilters)

- `planCacheListPlans`

- `planCacheListQueryShapes`

- [`$planCacheStats`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/planCacheStats.md#mongodb-pipeline-pipe.-planCacheStats) aggregation pipeline stage

- [`planCacheSetFilter`](https://www.mongodb.com/docs/manual/reference/command/planCacheSetFilter.md#mongodb-dbcommand-dbcmd.planCacheSetFilter)

- [`reIndex`](https://www.mongodb.com/docs/manual/reference/command/reIndex.md#mongodb-dbcommand-dbcmd.reIndex)

- `repairCursor`

- `repairDatabase`

- `replSetDeclareElectionWinner`

- `replSetElect`

- [`replSetFreeze`](https://www.mongodb.com/docs/manual/reference/command/replSetFreeze.md#mongodb-dbcommand-dbcmd.replSetFreeze)

- `replSetFresh`

- [`replSetGetConfig`](https://www.mongodb.com/docs/manual/reference/command/replSetGetConfig.md#mongodb-dbcommand-dbcmd.replSetGetConfig)

- `replSetGetRBID`

- [`replSetGetStatus`](https://www.mongodb.com/docs/manual/reference/command/replSetGetStatus.md#mongodb-dbcommand-dbcmd.replSetGetStatus)

- [`replSetHeartbeat`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-replSetHeartbeat)

- [`replSetInitiate`](https://www.mongodb.com/docs/manual/reference/command/replSetInitiate.md#mongodb-dbcommand-dbcmd.replSetInitiate)

- [`replSetMaintenance`](https://www.mongodb.com/docs/manual/reference/command/replSetMaintenance.md#mongodb-dbcommand-dbcmd.replSetMaintenance)

- [`replSetReconfig`](https://www.mongodb.com/docs/manual/reference/command/replSetReconfig.md#mongodb-dbcommand-dbcmd.replSetReconfig)

- `replSetRequestVotes`

- [`replSetStepDown`](https://www.mongodb.com/docs/manual/reference/command/replSetStepDown.md#mongodb-dbcommand-dbcmd.replSetStepDown)

- `replSetStepUp`

- [`replSetSyncFrom`](https://www.mongodb.com/docs/manual/reference/command/replSetSyncFrom.md#mongodb-dbcommand-dbcmd.replSetSyncFrom)

- `replSetUpdatePosition`

- [`resync`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-resync)

- [`revokePrivilegesFromRole`](https://www.mongodb.com/docs/manual/reference/command/revokePrivilegesFromRole.md#mongodb-dbcommand-dbcmd.revokePrivilegesFromRole)

- [`revokeRolesFromRole`](https://www.mongodb.com/docs/manual/reference/command/revokeRolesFromRole.md#mongodb-dbcommand-dbcmd.revokeRolesFromRole)

- [`revokeRolesFromUser`](https://www.mongodb.com/docs/manual/reference/command/revokeRolesFromUser.md#mongodb-dbcommand-dbcmd.revokeRolesFromUser)

- [`setClusterParameter`](https://www.mongodb.com/docs/manual/reference/command/setClusterParameter.md#mongodb-dbcommand-dbcmd.setClusterParameter)

- [`setFeatureCompatibilityVersion`](https://www.mongodb.com/docs/manual/reference/command/setFeatureCompatibilityVersion.md#mongodb-dbcommand-dbcmd.setFeatureCompatibilityVersion)

- `setLogLevel`

- [`setParameter`](https://www.mongodb.com/docs/manual/reference/command/setParameter.md#mongodb-dbcommand-dbcmd.setParameter)

- [`setProfilingLevel`](https://www.mongodb.com/docs/manual/reference/method/db.setProfilingLevel.md#mongodb-method-db.setProfilingLevel)

- [`shutdown`](https://www.mongodb.com/docs/manual/reference/command/shutdown.md#mongodb-dbcommand-dbcmd.shutdown)

- [`updateRole`](https://www.mongodb.com/docs/manual/reference/command/updateRole.md#mongodb-dbcommand-dbcmd.updateRole)

- [`updateUser`](https://www.mongodb.com/docs/manual/reference/command/updateUser.md#mongodb-dbcommand-dbcmd.updateUser)

- [`usersInfo`](https://www.mongodb.com/docs/manual/reference/command/usersInfo.md#mongodb-dbcommand-dbcmd.usersInfo)

- [`validate`](https://www.mongodb.com/docs/manual/reference/command/validate.md#mongodb-dbcommand-dbcmd.validate)

### Unsupported Command Line Options

Free clusters and Flex clusters don't support the following command line tool options:

| Command Line Tool | Unsupported Options |
| --- | --- |
| [`mongorestore`](https://www.mongodb.com/docs/database-tools/mongorestore.md#mongodb-binary-bin.mongorestore) | [--restoreDbUsersAndRoles](https://www.mongodb.com/docs/database-tools/mongorestore/#std-option-mongorestore.--restoreDbUsersAndRoles); [--oplogReplay](https://www.mongodb.com/docs/database-tools/mongorestore/#std-option-mongorestore.--oplogReplay); [--preserveUUID](https://www.mongodb.com/docs/database-tools/mongorestore/#std-option-mongorestore.--preserveUUID) |
| [`mongodump`](https://www.mongodb.com/docs/database-tools/mongodump.md#mongodb-binary-bin.mongodump) | [--dumpDbUsersAndRoles](https://www.mongodb.com/docs/database-tools/mongodump/#std-option-mongodump.--dumpDbUsersAndRoles); [--oplog](https://www.mongodb.com/docs/database-tools/mongodump/#std-option-mongodump.--oplog) |

For more information, see [M0 Cluster Limits.](https://www.mongodb.com/docs/atlas/reference/free-shared-limitations.md#std-label-atlas-free-tier)

## Unsupported Commands in M10+ Clusters

Atlas requires clients to authenticate to access an Atlas cluster. Atlas provides a curated list of [Database User Privileges](https://www.mongodb.com/docs/manual/reference/built-in-roles.md#std-label-atlas-user-privileges). These privileges provide access to a subset of MongoDB commands.

### Limited Commands

Atlas limits the [`db.killOp()`](https://www.mongodb.com/docs/manual/reference/method/db.killOp.md#mongodb-method-db.killOp) method to the MongoDB user who ran the operation.

Atlas supports the following sharding command on only `M30+` sharded clusters:

| Command | Shell Method | Privilege Action |
| --- | --- | --- |
| [abortRewriteCollection](https://www.mongodb.com/docs/upcoming/reference/command/abortRewriteCollection/) |  | [rewriteCollection](https://www.mongodb.com/docs/upcoming/reference/privilege-actions/#mongodb-authaction-rewriteCollection) |
| [`reshardCollection`](https://www.mongodb.com/docs/manual/reference/command/reshardCollection.md#mongodb-dbcommand-dbcmd.reshardCollection) | [`sh.reshardCollection()`](https://www.mongodb.com/docs/manual/reference/method/sh.reshardCollection.md#mongodb-method-sh.reshardCollection) | [`reshardCollection`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-reshardCollection) |
| [rewriteCollection](https://www.mongodb.com/docs/upcoming/reference/command/rewriteCollection/) |  | [rewriteCollection](https://www.mongodb.com/docs/upcoming/reference/privilege-actions/#mongodb-authaction-rewriteCollection) |
| [`unshardCollection`](https://www.mongodb.com/docs/manual/reference/command/unshardCollection.md#mongodb-dbcommand-dbcmd.unshardCollection) | [`sh.unshardCollection()`](https://www.mongodb.com/docs/manual/reference/method/sh.unshardCollection.md#mongodb-method-sh.unshardCollection) | [`unshardCollection`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-unshardCollection) |

### Unsupported Commands

The following table lists the most common commands and shell methods that database user privileges do not support. To ensure cluster stability and performance, Atlas subsumes or restricts the functionality that these commands provide.

#### Administrative

| Commands | Shell Method | Privilege Actions |
| --- | --- | --- |
| [`applyOps`](https://www.mongodb.com/docs/manual/reference/command/applyOps.md#mongodb-dbcommand-dbcmd.applyOps) |  | |
| [`dropConnections`](https://www.mongodb.com/docs/manual/reference/command/dropConnections.md#mongodb-dbcommand-dbcmd.dropConnections) |  | [`dropConnections`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-dropConnections) |
| `eval` | `db.eval()` | |
| [`fsync`](https://www.mongodb.com/docs/manual/reference/command/fsync.md#mongodb-dbcommand-dbcmd.fsync) | [`db.fsyncLock()`](https://www.mongodb.com/docs/manual/reference/method/db.fsyncLock.md#mongodb-method-db.fsyncLock) | [`fsync`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-fsync) |
| [`logRotate`](https://www.mongodb.com/docs/manual/reference/command/logRotate.md#mongodb-dbcommand-dbcmd.logRotate) |  | [`logRotate`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-logRotate) |
| [`setClusterParameter`](https://www.mongodb.com/docs/manual/reference/command/setClusterParameter.md#mongodb-dbcommand-dbcmd.setClusterParameter) |  | |
| [`setDefaultRWConcern`](https://www.mongodb.com/docs/manual/reference/command/setDefaultRWConcern.md#mongodb-dbcommand-dbcmd.setDefaultRWConcern) |  | [`setDefaultRWConcern`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-setDefaultRWConcern) |
| [`setFeatureCompatibilityVersion`](https://www.mongodb.com/docs/manual/reference/command/setFeatureCompatibilityVersion.md#mongodb-dbcommand-dbcmd.setFeatureCompatibilityVersion) |  | |
| [`setParameter`](https://www.mongodb.com/docs/manual/reference/command/setParameter.md#mongodb-dbcommand-dbcmd.setParameter) | [`db.setLogLevel()`](https://www.mongodb.com/docs/manual/reference/method/db.setLogLevel.md#mongodb-method-db.setLogLevel) Others that use [`setParameter`.](https://www.mongodb.com/docs/manual/reference/command/setParameter.md#mongodb-dbcommand-dbcmd.setParameter) | [`setParameter`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-setParameter) |
| [`shutdown`](https://www.mongodb.com/docs/manual/reference/command/shutdown.md#mongodb-dbcommand-dbcmd.shutdown) | [`db.shutdownServer()`](https://www.mongodb.com/docs/manual/reference/method/db.shutdownServer.md#mongodb-method-db.shutdownServer) | [`shutdown`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-shutdown) |

#### Sessions

| Commands | Shell Method | Privilege Actions |
| --- | --- | --- |
| [`killAllSessions`](https://www.mongodb.com/docs/manual/reference/command/killAllSessions.md#mongodb-dbcommand-dbcmd.killAllSessions) |  | |

#### Replication

| Commands | Shell Method | Privilege Actions |
| --- | --- | --- |
| [`replSetFreeze`](https://www.mongodb.com/docs/manual/reference/command/replSetFreeze.md#mongodb-dbcommand-dbcmd.replSetFreeze) | [`rs.freeze()`](https://www.mongodb.com/docs/manual/reference/method/rs.freeze.md#mongodb-method-rs.freeze) | [`replSetStateChange`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-replSetStateChange) |
| [`replSetInitiate`](https://www.mongodb.com/docs/manual/reference/command/replSetInitiate.md#mongodb-dbcommand-dbcmd.replSetInitiate) | [`rs.initiate()`](https://www.mongodb.com/docs/manual/reference/method/rs.initiate.md#mongodb-method-rs.initiate) | |
| [`replSetMaintenance`](https://www.mongodb.com/docs/manual/reference/command/replSetMaintenance.md#mongodb-dbcommand-dbcmd.replSetMaintenance) |  | [`replSetStateChange`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-replSetStateChange) |
| [`replSetReconfig`](https://www.mongodb.com/docs/manual/reference/command/replSetReconfig.md#mongodb-dbcommand-dbcmd.replSetReconfig) | [`rs.reconfig()`](https://www.mongodb.com/docs/manual/reference/method/rs.reconfig.md#mongodb-method-rs.reconfig) | |
| [`replSetResizeOplog`](https://www.mongodb.com/docs/manual/reference/command/replSetResizeOplog.md#mongodb-dbcommand-dbcmd.replSetResizeOplog) |  | |
| [`replSetStepDown`](https://www.mongodb.com/docs/manual/reference/command/replSetStepDown.md#mongodb-dbcommand-dbcmd.replSetStepDown) | [`rs.stepDown()`](https://www.mongodb.com/docs/manual/reference/method/rs.stepDown.md#mongodb-method-rs.stepDown) | [`replSetStateChange`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-replSetStateChange) |
| [`replSetSyncFrom`](https://www.mongodb.com/docs/manual/reference/command/replSetSyncFrom.md#mongodb-dbcommand-dbcmd.replSetSyncFrom) | [`rs.syncFrom()`](https://www.mongodb.com/docs/manual/reference/method/rs.syncFrom.md#mongodb-method-rs.syncFrom) | [`replSetStateChange`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-replSetStateChange) |
| `resync` |  | [`resync`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-resync) |

#### Sharding

| Commands | Shell Method | Privilege Actions |
| --- | --- | --- |
|  | [`sh.disableBalancing()`](https://www.mongodb.com/docs/manual/reference/method/sh.disableBalancing.md#mongodb-method-sh.disableBalancing) | |
|  | [`sh.enableBalancing()`](https://www.mongodb.com/docs/manual/reference/method/sh.enableBalancing.md#mongodb-method-sh.enableBalancing) | |
| [`refineCollectionShardKey`](https://www.mongodb.com/docs/manual/reference/command/refineCollectionShardKey.md#mongodb-dbcommand-dbcmd.refineCollectionShardKey) |  | [`refineCollectionShardKey`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-refineCollectionShardKey) |
| [`removeShard`](https://www.mongodb.com/docs/manual/reference/command/removeShard.md#mongodb-dbcommand-dbcmd.removeShard) |  | [`removeShard`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-removeShard) |

You can use [`setAllowMigrations`](https://www.mongodb.com/docs/manual/reference/command/setAllowMigrations.md#mongodb-dbcommand-dbcmd.setAllowMigrations) to control the balancing of a specific collection.

This command is not supported on [global write](https://www.mongodb.com/docs/atlas/shard-global-collection.md#std-label-global-writes-collections) clusters only.

#### User and Role Management

**Note:**

As an alternative, see the available [Atlas User Roles.](https://www.mongodb.com/docs/atlas/reference/user-roles.md#std-label-user-roles)

| Commands | Shell Method | Privilege Actions |
| --- | --- | --- |
| [`createRole`](https://www.mongodb.com/docs/manual/reference/command/createRole.md#mongodb-dbcommand-dbcmd.createRole) | [`db.createRole()`](https://www.mongodb.com/docs/manual/reference/method/db.createRole.md#mongodb-method-db.createRole) | [`createRole`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-createRole) |
| [`createUser`](https://www.mongodb.com/docs/manual/reference/command/createUser.md#mongodb-dbcommand-dbcmd.createUser) | [`db.createUser()`](https://www.mongodb.com/docs/manual/reference/method/db.createUser.md#mongodb-method-db.createUser) | [`createUser`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-createUser) |
| [`dropRole`](https://www.mongodb.com/docs/manual/reference/command/dropRole.md#mongodb-dbcommand-dbcmd.dropRole) | [`db.dropRole()`](https://www.mongodb.com/docs/manual/reference/method/db.dropRole.md#mongodb-method-db.dropRole) | [`dropRole`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-dropRole) |
| [`dropUser`](https://www.mongodb.com/docs/manual/reference/command/dropUser.md#mongodb-dbcommand-dbcmd.dropUser) | [`db.dropUser()`](https://www.mongodb.com/docs/manual/reference/method/db.dropUser.md#mongodb-method-db.dropUser) | [`dropUser`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-dropUser) |
| `getUser` | [`db.getUser()`](https://www.mongodb.com/docs/manual/reference/method/db.getUser.md#mongodb-method-db.getUser) and [`db.getUsers()`](https://www.mongodb.com/docs/manual/reference/method/db.getUsers.md#mongodb-method-db.getUsers) | |
| [`grantRolesToUser`](https://www.mongodb.com/docs/manual/reference/command/grantRolesToUser.md#mongodb-dbcommand-dbcmd.grantRolesToUser) | [`db.grantRolesToUser()`](https://www.mongodb.com/docs/manual/reference/method/db.grantRolesToUser.md#mongodb-method-db.grantRolesToUser) | [`grantRole`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-grantRole) |
| [`revokeRolesFromUser`](https://www.mongodb.com/docs/manual/reference/command/revokeRolesFromUser.md#mongodb-dbcommand-dbcmd.revokeRolesFromUser) | [`db.revokeRolesFromUser()`](https://www.mongodb.com/docs/manual/reference/method/db.revokeRolesFromUser.md#mongodb-method-db.revokeRolesFromUser) | [`revokeRole`](https://www.mongodb.com/docs/manual/reference/privilege-actions.md#mongodb-authaction-revokeRole) |
| [`updateRole`](https://www.mongodb.com/docs/manual/reference/command/updateRole.md#mongodb-dbcommand-dbcmd.updateRole) | [`db.updateRole()`](https://www.mongodb.com/docs/manual/reference/method/db.updateRole.md#mongodb-method-db.updateRole) | |
| [`updateUser`](https://www.mongodb.com/docs/manual/reference/command/updateUser.md#mongodb-dbcommand-dbcmd.updateUser) | [`db.updateUser()`](https://www.mongodb.com/docs/manual/reference/method/db.updateUser.md#mongodb-method-db.updateUser) | |
| [`usersInfo`](https://www.mongodb.com/docs/manual/reference/command/usersInfo.md#mongodb-dbcommand-dbcmd.usersInfo) |  | |

You can call `getUser` for your own user account.

### Unsupported Command Line Options

M10+ clusters don't support the [--preserveUUID](https://www.mongodb.com/docs/database-tools/mongorestore/#std-option-mongorestore.--preserveUUID) option for [`mongorestore`](https://www.mongodb.com/docs/database-tools/mongorestore.md#mongodb-binary-bin.mongorestore).

### Contact Support

Contact Atlas [support](https://www.mongodb.com/docs/atlas/support.md#std-label-atlas-support) if your use case requires access to a command that the Atlas database user privileges don't currently support.
