Enhanced LDAP Integration

Enhanced LDAP Integration is only available in Grafana Enterprise. Read more about Grafana Enterprise.

The enhanced LDAP integration adds additional functionality on top of the existing LDAP integration.

LDAP Group Synchronization for Teams

Enhanced LDAP - 图1Enhanced LDAP - 图2

With the enhanced LDAP integration it’s possible to setup synchronization between LDAP groups and teams. This enables LDAP users which are members of certain LDAP groups to automatically be added/removed as members to certain teams in Grafana. Currently the synchronization will only happen every time a user logs in, but an active background synchronization is currently being developed.

Grafana keeps track of all synchronized users in teams and you can see which users have been synchronized from LDAP in the team members list, see LDAP label in screenshot. This mechanism allows Grafana to remove an existing synchronized user from a team when its LDAP group membership changes. This mechanism also enables you to manually add a user as member of a team and it will not be removed when the user signs in. This gives you flexibility to combine LDAP group memberships and Grafana team memberships.

Enable LDAP group synchronization for a team

Enhanced LDAP - 图3Enhanced LDAP - 图4

  • Navigate to Configuration / Teams.
  • Select a team.
  • Select the External group sync tab and click on the Add group button.
  • Insert LDAP distinguished name (DN) of LDAP group you want to synchronize with the team.
  • Click on Add group button to save.

Active LDAP Synchronization

Only available in Grafana Enterprise v6.3+

In the open source version of Grafana, user data from LDAP will be synchronized only during the login process when authenticating using LDAP.

With this feature you can configure Grafana to actively sync users with LDAP server(s) in the background. Role and team membership will be updated, removed users will be disabled and logged out. Only users that have logged into Grafana at least once will be synchronized.

  1. [auth.ldap]
  2. ...
  3. # You can use the Cron syntax or several predefined schedulers -
  4. # @yearly (or @annually) | Run once a year, midnight, Jan. 1st | 0 0 0 1 1 *
  5. # @monthly | Run once a month, midnight, first of month | 0 0 0 1 * *
  6. # @weekly | Run once a week, midnight between Sat/Sun | 0 0 0 * * 0
  7. # @daily (or @midnight) | Run once a day, midnight | 0 0 0 * * *
  8. # @hourly | Run once an hour, beginning of hour | 0 0 * * * *
  9. sync_cron = "0 0 1 * * *" # This is default value (At 1 am every day)
  10. # This cron expression format uses 6 space-separated fields (including seconds), for example
  11. # sync_cron = "* */10 * * * *"
  12. # This will run the LDAP Synchronization every 10th minute, which is also the minimal interval between the grafana sync times i.e. you cannot set it for every 9th minute
  13. # You can also disable active LDAP synchronization
  14. active_sync_enabled = true # enabled by default