# Configuration user name and rol from Azure AD

**URL:** <https://discuss.elastic.co/t/configuration-user-name-and-rol-from-azure-ad/359735>\
**Category:** Kibana\
**Tags:** elastic-stack-security\
**Created:** [May 17, 2024, 8:55pm UTC](https://discuss.elastic.co/t/configuration-user-name-and-rol-from-azure-ad/359735 "2024-05-17T20:55:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![POR16734](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@POR16734](https://discuss.elastic.co/u/POR16734)\
**Post date:** [May 17, 2024, 8:55pm UTC](https://discuss.elastic.co/t/configuration-user-name-and-rol-from-azure-ad/359735/1 "2024-05-17T20:55:03Z")

</div>

Hello everyone,

I have a question I am configuring all access to ElasticCloud at kibana level with the active directory of Azure already have connection and this all perfect the doubt is the following:

how can I assign the name and email correctly when the user performs in kibana log in ?

currently the username that shows the application is the email.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/1/6194729d63cbe7fa045c2e8f956b24fd90a06dc1.png)

When I make the query with the authentication api yields the following information:

_ **GET /\_security/\_authenticate** _

```auto
{
  "username": "adewxz@myempre.com",
  "roles": [
    "Kibana_Access",
    "superuser"
  ],
  "full_name": null,
  "email": null,
  "metadata": {
    "saml(http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname)": [
      "Terry Mon"
    ],
    "saml(http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress)": [
      "adewxz@myempre.com"
    ],
    "saml(http://schemas.microsoft.com/claims/authnmethodsreferences)": [
      "http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password"
    ],
    "saml(http://schemas.microsoft.com/identity/claims/objectidentifier)": [
      "3f009421-1a47-6784-1234-4ec1842c6d88"
    ],
    "saml_nameid_format": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
    "saml(http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname)": [
      "Marcus Maracus"
    ],
    "saml(http://schemas.microsoft.com/ws/2008/06/identity/claims/groups)": [
      "b3e536b8-f654-1233-9e93-1ba1f68bf444",
      "095c28fd-ef5b-46a2-88af-76c123c004b0"
    ],
    "saml(http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name)": [
      "POR16734@porvenir.com.co"
    ],
    "saml_nameid": "POR16734@porvenir.com.co",
    "saml(http://schemas.microsoft.com/identity/claims/identityprovider)": [
      "https://sts.windows.net/10a22222-88f6-46a2-4567-31bd8b76f654/"
    ],
    "saml(http://schemas.microsoft.com/identity/claims/tenantid)": [
      "10a76712-9089-uiio-4545-31bd8b76f676"
    ],
    "saml(http://schemas.microsoft.com/identity/claims/displayname)": [
      "Marcus Maracus Terry Mon"
    ]
  },
  "enabled": true,
  "authentication_realm": {
    "name": "kibana-realm",
    "type": "saml"
  },
  "lookup_realm": {
    "name": "kibana-realm",
    "type": "saml"
  },
  "authentication_type": "token"
}

```

My configuration in rol Mapping:

```auto
{
  "all": [
    {
      "field": {
        "realm.name": "kibana-realm"
      }
    },
    {
      "field": {
        "username": [
          "<firstname.lastname>"
        ]
      }
    },
    {
      "field": {
        "groups": "095c28fd-ef5b-46a2-88af-76c123c004b0"
      }
    }
  ]
}

```
