{
  "schema_version": 2,
  "id": "commands/acl-getuser",
  "title": "ACL GETUSER",
  "url": "https://redis.io/docs/latest/commands/acl-getuser/",
  "summary": "Lists the ACL rules of a user.",
  "since": "6.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:09+01:00",
  "page_type": "content",
  "content_hash": "b8fc8efa5760db652e7a2a5e85b19317066a8c4bd82ae69acbe45ac4465e0436",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "The command returns all the rules defined for an existing ACL user.\n\nSpecifically, it lists the user's ACL flags, password hashes, commands, key patterns, channel patterns (Added in version 6.2) and selectors (Added in version 7.0).\nAdditional information may be returned in the future if more metadata is added to the user.\n\nCommand rules are always returned in the same format as the one used in the [`ACL SETUSER`](https://redis.io/docs/latest/commands/acl-setuser) command.\nBefore version 7.0, keys and channels were returned as an array of patterns, however in version 7.0 later they are now also returned in same format as the one used in the [`ACL SETUSER`](https://redis.io/docs/latest/commands/acl-setuser) command.\nNote: This description of command rules reflects the user's effective permissions, so while it may not be identical to the set of rules used to configure the user, it is still functionally identical.\n\nSelectors are listed in the order they were applied to the user, and include information about commands, key patterns, and channel patterns."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>username</code></summary>\n\nThe user whose rules to return.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "Here's an example configuration for a user\n\n[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> | Not supported for [scripts](https://redis.io/docs/latest/develop/programmability). |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\nOne of the following:\n* [Array reply](../../develop/reference/protocol-spec#arrays): a list of ACL rule definitions for the user.\n* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if user does not exist.\n\n**RESP3:**\n\nOne of the following:\n* [Map reply](../../develop/reference/protocol-spec#maps): a set of ACL rule definitions for the user\n* [Null reply](../../develop/reference/protocol-spec#nulls): if user does not exist."
    }
  ],
  "examples": [
    {
      "id": "examples-ex0",
      "language": "plaintext",
      "code": "> ACL SETUSER sample on nopass +GET allkeys &* (+SET ~key2)\n\"OK\"\n> ACL GETUSER sample\n1) \"flags\"\n2) 1) \"on\"\n   2) \"allkeys\"\n   3) \"nopass\"\n3) \"passwords\"\n4) (empty array)\n5) \"commands\"\n6) \"+@all\"\n7) \"keys\"\n8) \"~*\"\n9) \"channels\"\n10) \"&*\"\n11) \"selectors\"\n12) 1) 1) \"commands\"\n       6) \"+SET\"\n       7) \"keys\"\n       8) \"~key2\"\n       9) \"channels\"\n       10) \"&*\"",
      "section_id": "examples"
    }
  ]
}
