{
  "schema_version": 2,
  "id": "commands/acl-dryrun",
  "title": "ACL DRYRUN",
  "url": "https://redis.io/docs/latest/commands/acl-dryrun/",
  "summary": "Simulates the execution of a command by a user, without executing the command.",
  "since": "7.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-06-15T06:26:34-07:00",
  "page_type": "content",
  "content_hash": "6e1d2eead83080a6a615ded446d938cc4eadaffdbbe575059d0b2a9901c90041",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Simulate the execution of a given command by a given user.\nThis command can be used to test the permissions of a given user without having to enable the user or cause the side effects of running the command."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>username</code></summary>\n\nThe user to run the simulated command as.\n\n</details>\n\n<details open><summary><code>command</code></summary>\n\nThe command to test.\n\n</details>"
    },
    {
      "id": "optional-arguments",
      "title": "Optional arguments",
      "role": "parameters",
      "text": "<details open><summary><code>arg [arg ...]</code></summary>\n\nThe arguments to pass to the tested command.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "[code example]"
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | Might reply with \"unknown user\" for LDAP users even if `AUTH` succeeds. |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\nAny of the following:\n* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success.\n* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): an error describing why the user can't execute the command.\n\n**RESP3:**\n\nAny of the following:\n* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success.\n* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): an error describing why the user can't execute the command."
    }
  ],
  "examples": [
    {
      "id": "examples-ex0",
      "language": "plaintext",
      "code": "> ACL SETUSER VIRGINIA +SET ~*\n\"OK\"\n> ACL DRYRUN VIRGINIA SET foo bar\n\"OK\"\n> ACL DRYRUN VIRGINIA GET foo\n\"User VIRGINIA has no permissions to run the 'get' command\"",
      "section_id": "examples"
    }
  ]
}
