Enable users
Generally available
All methods and paths for this operation:
PUT
/_security/user/{username}/_enable
POST
/_security/user/{username}/_enable
Enable users in the native realm. By default, when you create users, they are enabled.
highlight#highlightFromAnchor" href="#topic-required-authorization"> Required authorization
- Cluster privileges:
manage_security
POST
/_security/user/{username}/_enable
dropdown#toggle click@window->dropdown#hide touchend@window->dropdown#hide"
data-dropdown-target="button"
data-scrollable="false"
data-headings="false"
aria-expanded="false"
aria-haspopup="true"
role="menu"
tabindex="0">
Console
PUT _security/user/logstash_system/_enable
resp = client.security.enable_user(
username="logstash_system",
)
const response = await client.security.enableUser({
username: "logstash_system",
});
response = client.security.enable_user(
username: "logstash_system"
)
$resp = $client->security()->enableUser([
"username" => "logstash_system",
]);
curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/user/logstash_system/_enable"
client.security().enableUser(e -> e
.username("logstash_system")
);