New users do not receive mails and can not log in


I am having some problems creating new users and granting them access.

What I am doing
Stack Management > Users > Create User

When trying to log in with the new user I receive "Invalid username or password. Please try again."

I have been researching a bit and found this thread.
In order to check if the default realm was enabled, I ran

GET /_security/user/{username}

Based on the documentation

If the user is not defined in the native realm, the request 404s.

But I do receive an answer in the form

  "username" : {
    "username" : "username",
    "roles" : [ ],
    "full_name" : "FullName",
    "email" : "",
    "metadata" : { },
    "enabled" : true

Any suggestions on why I am not able to log in with any newly created users?

Thank you beforehand.

Matteo Fiore


GET /_cluster/settings?include_defaults=true
I have been digging around and found out that the realms settings look like

  "realms": {
    "saml": {
      "cloud-xyz": {
        "order": "3"
    "native": {
      "native": {
        "order": "1"
    "file": {
      "found": {
        "order": "0"

I have been trying to use the

PUT /_cluster/settings
  "persistent": {
    "xpack": {
      "security": {
        "authc": {
          "realms": {
            "native": {
              "native": {
                "order": 0

to change the order but no luck so far.

  1. You should not need to change the realm settings in your cloud instance. The defaults are fine you can't and there is no need to set the native to order 0.

  2. New users do not receive mails

    They shouldn't , this is not a functionality that elastic cloud offers at this time ( i.e. deployment users getting notified of account creation via email )

  3. I have been researching a bit and found this thread.

    This is about and on premise installation and not applicable to your case

Can you clarify where do you try to login ? Is it the same kibana instance as the one you created the user in? What version is your kibana + es cluster ?

Thank you for your answer.

Ok, I realized I was making a rather silly mistake. I was trying to log in into instead of logging in into Kibana.

How can I create users so that they log-in and manage the deployments?

Also, I've been trying to connect to ES through Spark using the newly created users.

      .option("", "username")
      .option("", "password")
      .option("es.nodes", "node")
      .option("es.port", "port")

But what I obtain is (for both elastic and newly created user): security_exception: unable to authenticate user [username] for REST request [/]

At first, I thought that the issue was the same as not being able to log-in in the UI, but then trying to connect using

from datetime import datetime
from elasticsearch import Elasticsearch

es = Elasticsearch(['endpoint'], http_auth=('username', 'password'))

doc = {
    'author': 'kimchy2',
    'text': 'Elasticsearch: cool. bonsai cool.',
res = es.index(index="test-index", id=3, body=doc)

does not result in error.

Would you be able to help with that issue as well?
Thank you beforehand!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.