I would like to map azureAD roles or groups with elasticsearch roles, I have no idea how to start.
Also, how can I get fill "Full name" and "Email" fields?
The path I would recommend is:
- Login via AzureAD into Kibana using a user that is a representative example of how your users are setup
- In the Kibana left hand menu, select Dev Tools (in the Management section at the bottom), and open the Console tab (default)
- Run
GET /_security/_authenticate - The response will contain a
metadataobject with a bunch ofoidc(some_name_here)fields. Those fields contain the OpenId Connect claim fields that were received from AzureAD. - Find the names of claims that give you the groups/roles, full name, and email from AzureAD. Since you have the
profileandemailscopes set you should have a " name" and "email" claim. (If they're not there, then you will need to change something in AzureAD to provide those claims). - Then set
claims.nameandclaims.mailto the claim names you found above. You've already setclaims.groupsto "groups". If that doesn't match what you saw in Dev Console, then change it to the correct claim. - Restart your Elasticsearch node, and then login again.
- Your name & email should now be populated.
- To assign ES roles from your AzureAD groups, you can follow the example here: Configuring single sign-on to the Elastic Stack using OpenID Connect | Elasticsearch Guide [8.7] | Elastic