New

The executive guide to generative AI

Read more
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.

Get user privileges API

edit

Retrieves the security privileges for the logged in user.

Request

edit

GET /_security/user/_privileges

Prerequisites

edit

Description

edit

To check whether a user has a specific list of privileges, use the has privileges API.

Examples

edit
GET /_security/user/_privileges
{
  "cluster" : [
    "all"
  ],
  "global" : [ ],
  "indices" : [
    {
      "names" : [
        "*"
      ],
      "privileges" : [
        "all"
      ],
      "allow_restricted_indices" : true
    }
  ],
  "applications" : [
    {
      "application" : "*",
      "privileges" : [
        "*"
      ],
      "resources" : [
        "*"
      ]
    }
  ],
  "run_as" : [
    "*"
  ]
}
Was this helpful?
Feedback