<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Authentication on Grafana Labs</title><link>https://grafana.com/docs/grafana/v6.1/auth/</link><description>Recent content in Authentication on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/grafana/v6.1/auth/index.xml" rel="self" type="application/rss+xml"/><item><title>Auth Proxy</title><link>https://grafana.com/docs/grafana/v6.1/auth/auth-proxy/</link><pubDate>Tue, 14 Apr 2026 18:51:29 +0000</pubDate><guid>https://grafana.com/docs/grafana/v6.1/auth/auth-proxy/</guid><content><![CDATA[&lt;h1 id=&#34;auth-proxy-authentication&#34;&gt;Auth Proxy Authentication&lt;/h1&gt;
&lt;p&gt;You can configure Grafana to let a http reverse proxy handling authentication. Popular web servers have a very
extensive list of pluggable authentication modules, and any of them can be used with the AuthProxy feature.
Below we detail the configuration options for auth proxy.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.proxy]
# Defaults to false, but set to true to enable this feature
enabled = true
# HTTP Header name that will contain the username or email
header_name = X-WEBAUTH-USER
# HTTP Header property, defaults to `username` but can also be `email`
header_property = username
# Set to `true` to enable auto sign up of users who do not exist in Grafana DB. Defaults to `true`.
auto_sign_up = true
# If combined with Grafana LDAP integration define sync interval
ldap_sync_ttl = 60
# Limit where auth proxy requests come from by configuring a list of IP addresses.
# This can be used to prevent users spoofing the X-WEBAUTH-USER header.
# Example `whitelist = 192.168.1.1, 192.168.1.0/24, 2001::23, 2001::0/120`
whitelist =
# Optionally define more headers to sync other user attributes
# Example `headers = Name:X-WEBAUTH-NAME Email:X-WEBAUTH-EMAIL`
headers =&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;interacting-with-grafanas-authproxy-via-curl&#34;&gt;Interacting with Grafana’s AuthProxy via curl&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;curl -H &amp;#34;X-WEBAUTH-USER: admin&amp;#34;  http://localhost:3000/api/users
[
    {
        &amp;#34;id&amp;#34;:1,
        &amp;#34;name&amp;#34;:&amp;#34;&amp;#34;,
        &amp;#34;login&amp;#34;:&amp;#34;admin&amp;#34;,
        &amp;#34;email&amp;#34;:&amp;#34;admin@localhost&amp;#34;,
        &amp;#34;isAdmin&amp;#34;:true
    }
]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We can then send a second request to the &lt;code&gt;/api/user&lt;/code&gt; method which will return the details of the logged in user. We will use this request to show how Grafana automatically adds the new user we specify to the system. Here we create a new user called “anthony”.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;curl -H &amp;#34;X-WEBAUTH-USER: anthony&amp;#34; http://localhost:3000/api/user
{
    &amp;#34;email&amp;#34;:&amp;#34;anthony&amp;#34;,
    &amp;#34;name&amp;#34;:&amp;#34;&amp;#34;,
    &amp;#34;login&amp;#34;:&amp;#34;anthony&amp;#34;,
    &amp;#34;theme&amp;#34;:&amp;#34;&amp;#34;,
    &amp;#34;orgId&amp;#34;:1,
    &amp;#34;isGrafanaAdmin&amp;#34;:false
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;making-apaches-auth-work-together-with-grafanas-authproxy&#34;&gt;Making Apache’s auth work together with Grafana’s AuthProxy&lt;/h2&gt;
&lt;p&gt;I’ll demonstrate how to use Apache for authenticating users. In this example we use BasicAuth with Apache’s text file based authentication handler, i.e. htpasswd files. However, any available Apache authentication capabilities could be used.&lt;/p&gt;
&lt;h3 id=&#34;apache-basicauth&#34;&gt;Apache BasicAuth&lt;/h3&gt;
&lt;p&gt;In this example we use Apache as a reverse proxy in front of Grafana. Apache handles the Authentication of users before forwarding requests to the Grafana backend service.&lt;/p&gt;
&lt;h4 id=&#34;apache-configuration&#34;&gt;Apache configuration&lt;/h4&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;    &amp;lt;VirtualHost *:80&amp;gt;
        ServerAdmin webmaster@authproxy
        ServerName authproxy
        ErrorLog &amp;#34;logs/authproxy-error_log&amp;#34;
        CustomLog &amp;#34;logs/authproxy-access_log&amp;#34; common

        &amp;lt;Proxy *&amp;gt;
            AuthType Basic
            AuthName GrafanaAuthProxy
            AuthBasicProvider file
            AuthUserFile /etc/apache2/grafana_htpasswd
            Require valid-user

            RewriteEngine On
            RewriteRule .* - [E=PROXY_USER:%{LA-U:REMOTE_USER},NS]
            RequestHeader set X-WEBAUTH-USER &amp;#34;%{PROXY_USER}e&amp;#34;
        &amp;lt;/Proxy&amp;gt;

        RequestHeader unset Authorization

        ProxyRequests Off
        ProxyPass / http://localhost:3000/
        ProxyPassReverse / http://localhost:3000/
    &amp;lt;/VirtualHost&amp;gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The first 4 lines of the virtualhost configuration are standard, so we won’t go into detail      on what they do.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We use a &lt;strong&gt;&amp;lt;proxy&amp;gt;&lt;/strong&gt; configuration block for applying our authentication rules to every proxied request. These rules include requiring basic authentication where user:password credentials are stored in the &lt;strong&gt;/etc/apache2/grafana_htpasswd&lt;/strong&gt; file. This file can be created with the &lt;code&gt;htpasswd&lt;/code&gt; command.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The next part of the configuration is the tricky part. We use Apache’s rewrite engine to create our &lt;strong&gt;X-WEBAUTH-USER header&lt;/strong&gt;, populated with the authenticated user.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;&lt;em&gt;RewriteRule .&lt;/em&gt; - [E=PROXY_USER:%{LA-U:REMOTE_USER}, NS]&lt;/em&gt;*: This line is a little bit of magic. What it does, is for every request use the rewriteEngines look-ahead (LA-U) feature to determine what the REMOTE_USER variable would be set to after processing the request. Then assign the result to the variable PROXY_USER. This is necessary as the REMOTE_USER variable is not available to the RequestHeader function.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;RequestHeader set X-WEBAUTH-USER “%{PROXY_USER}e”&lt;/strong&gt;: With the authenticated username now stored in the PROXY_USER variable, we create a new HTTP request header that will be sent to our backend Grafana containing the username.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The &lt;strong&gt;RequestHeader unset Authorization&lt;/strong&gt; removes the Authorization header from the HTTP request before it is forwarded to Grafana. This ensures that Grafana does not try to authenticate the user using these credentials (BasicAuth is a supported authentication handler in Grafana).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The last 3 lines are then just standard reverse proxy configuration to direct all authenticated requests to our Grafana server running on port 3000.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;full-walk-through-using-docker&#34;&gt;Full walk through using Docker.&lt;/h2&gt;
&lt;p&gt;For this example, we use the official Grafana docker image available at &lt;a href=&#34;https://hub.docker.com/r/grafana/grafana/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Docker Hub&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a file &lt;code&gt;grafana.ini&lt;/code&gt; with the following contents&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[users]
allow_sign_up = false
auto_assign_org = true
auto_assign_org_role = Editor

[auth.proxy]
enabled = true
header_name = X-WEBAUTH-USER
header_property = username
auto_sign_up = true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Launch the Grafana container, using our custom grafana.ini to replace &lt;code&gt;/etc/grafana/grafana.ini&lt;/code&gt;. We don&amp;rsquo;t expose
any ports for this container as it will only be connected to by our Apache container.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;docker run -i -v $(pwd)/grafana.ini:/etc/grafana/grafana.ini --name grafana grafana/grafana&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;apache-container&#34;&gt;Apache Container&lt;/h3&gt;
&lt;p&gt;For this example we use the official Apache docker image available at &lt;a href=&#34;https://hub.docker.com/_/httpd/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Docker Hub&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a file &lt;code&gt;httpd.conf&lt;/code&gt; with the following contents&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;ServerRoot &amp;#34;/usr/local/apache2&amp;#34;
Listen 80
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule headers_module modules/mod_headers.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
&amp;lt;IfModule unixd_module&amp;gt;
User daemon
Group daemon
&amp;lt;/IfModule&amp;gt;
ServerAdmin you@example.com
&amp;lt;Directory /&amp;gt;
    AllowOverride none
    Require all denied
&amp;lt;/Directory&amp;gt;
DocumentRoot &amp;#34;/usr/local/apache2/htdocs&amp;#34;
ErrorLog /proc/self/fd/2
LogLevel error
&amp;lt;IfModule log_config_module&amp;gt;
    LogFormat &amp;#34;%h %l %u %t \&amp;#34;%r\&amp;#34; %&amp;gt;s %b \&amp;#34;%{Referer}i\&amp;#34; \&amp;#34;%{User-Agent}i\&amp;#34;&amp;#34; combined
    LogFormat &amp;#34;%h %l %u %t \&amp;#34;%r\&amp;#34; %&amp;gt;s %b&amp;#34; common
    &amp;lt;IfModule logio_module&amp;gt;
    LogFormat &amp;#34;%h %l %u %t \&amp;#34;%r\&amp;#34; %&amp;gt;s %b \&amp;#34;%{Referer}i\&amp;#34; \&amp;#34;%{User-Agent}i\&amp;#34; %I %O&amp;#34; combinedio
    &amp;lt;/IfModule&amp;gt;
    CustomLog /proc/self/fd/1 common
&amp;lt;/IfModule&amp;gt;
&amp;lt;Proxy *&amp;gt;
    AuthType Basic
    AuthName GrafanaAuthProxy
    AuthBasicProvider file
    AuthUserFile /tmp/htpasswd
    Require valid-user
    RewriteEngine On
    RewriteRule .* - [E=PROXY_USER:%{LA-U:REMOTE_USER},NS]
    RequestHeader set X-WEBAUTH-USER &amp;#34;%{PROXY_USER}e&amp;#34;
&amp;lt;/Proxy&amp;gt;
RequestHeader unset Authorization
ProxyRequests Off
ProxyPass / http://grafana:3000/
ProxyPassReverse / http://grafana:3000/&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a htpasswd file. We create a new user &lt;strong&gt;anthony&lt;/strong&gt; with the password &lt;strong&gt;password&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;htpasswd -bc htpasswd anthony password&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Launch the httpd container using our custom httpd.conf and our htpasswd file. The container will listen on port 80, and we create a link to the &lt;strong&gt;grafana&lt;/strong&gt; container so that this container can resolve the hostname &lt;strong&gt;grafana&lt;/strong&gt; to the grafana container’s ip address.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;docker run -i -p 80:80 --link grafana:grafana -v $(pwd)/httpd.conf:/usr/local/apache2/conf/httpd.conf -v $(pwd)/htpasswd:/tmp/htpasswd httpd:2.4&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;use-grafana&#34;&gt;Use grafana.&lt;/h3&gt;
&lt;p&gt;With our Grafana and Apache containers running, you can now connect to http://localhost/ and log in using the username/password we created in the htpasswd file.&lt;/p&gt;
]]></content><description>&lt;h1 id="auth-proxy-authentication">Auth Proxy Authentication&lt;/h1>
&lt;p>You can configure Grafana to let a http reverse proxy handling authentication. Popular web servers have a very
extensive list of pluggable authentication modules, and any of them can be used with the AuthProxy feature.
Below we detail the configuration options for auth proxy.&lt;/p></description></item><item><title>Enhanced LDAP Integration</title><link>https://grafana.com/docs/grafana/v6.1/auth/enhanced_ldap/</link><pubDate>Tue, 14 Apr 2026 18:51:29 +0000</pubDate><guid>https://grafana.com/docs/grafana/v6.1/auth/enhanced_ldap/</guid><content><![CDATA[&lt;h1 id=&#34;enhanced-ldap-integration&#34;&gt;Enhanced LDAP Integration&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;Enhanced LDAP Integration is only available in Grafana Enterprise. Read more about &lt;a href=&#34;../../enterprise/&#34;&gt;Grafana Enterprise&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The enhanced LDAP integration adds additional functionality on top of the &lt;a href=&#34;../ldap/&#34;&gt;existing LDAP integration&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;ldap-group-synchronization-for-teams&#34;&gt;LDAP Group Synchronization for Teams&lt;/h2&gt;
&lt;figure
    class=&#34;figure-wrapper figure-wrapper__lightbox w-100p docs-image--no-shadow docs-image--right&#34;
    style=&#34;max-width: 600px;&#34;
    itemprop=&#34;associatedMedia&#34;
    itemscope=&#34;&#34;
    itemtype=&#34;http://schema.org/ImageObject&#34;
  &gt;&lt;a
        class=&#34;lightbox-link&#34;
        href=&#34;/static/img/docs/enterprise/team_members_ldap.png&#34;
        itemprop=&#34;contentUrl&#34;
      &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
          class=&#34;lazyload &#34;
          data-src=&#34;/static/img/docs/enterprise/team_members_ldap.png&#34;data-srcset=&#34;/static/img/docs/enterprise/team_members_ldap.png?w=320 320w, /static/img/docs/enterprise/team_members_ldap.png?w=550 550w, /static/img/docs/enterprise/team_members_ldap.png?w=750 750w, /static/img/docs/enterprise/team_members_ldap.png?w=900 900w, /static/img/docs/enterprise/team_members_ldap.png?w=1040 1040w, /static/img/docs/enterprise/team_members_ldap.png?w=1240 1240w, /static/img/docs/enterprise/team_members_ldap.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;&#34;width=&#34;979&#34;height=&#34;382&#34;/&gt;
        &lt;noscript&gt;
          &lt;img
            src=&#34;/static/img/docs/enterprise/team_members_ldap.png&#34;
            alt=&#34;&#34;width=&#34;979&#34;height=&#34;382&#34;class=&#34;docs-image--no-shadow docs-image--right&#34;/&gt;
        &lt;/noscript&gt;&lt;/div&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;p&gt;With the enhanced LDAP integration it&amp;rsquo;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.&lt;/p&gt;
&lt;p&gt;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 &lt;code&gt;LDAP&lt;/code&gt; 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.&lt;/p&gt;
&lt;div class=&#34;clearfix&#34;&gt;&lt;/div&gt;
&lt;h3 id=&#34;enable-ldap-group-synchronization-for-a-team&#34;&gt;Enable LDAP group synchronization for a team&lt;/h3&gt;
&lt;figure
    class=&#34;figure-wrapper figure-wrapper__lightbox w-100p docs-image--no-shadow docs-image--right&#34;
    style=&#34;max-width: 600px;&#34;
    itemprop=&#34;associatedMedia&#34;
    itemscope=&#34;&#34;
    itemtype=&#34;http://schema.org/ImageObject&#34;
  &gt;&lt;a
        class=&#34;lightbox-link&#34;
        href=&#34;/static/img/docs/enterprise/team_add_external_group.png&#34;
        itemprop=&#34;contentUrl&#34;
      &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
          class=&#34;lazyload &#34;
          data-src=&#34;/static/img/docs/enterprise/team_add_external_group.png&#34;data-srcset=&#34;/static/img/docs/enterprise/team_add_external_group.png?w=320 320w, /static/img/docs/enterprise/team_add_external_group.png?w=550 550w, /static/img/docs/enterprise/team_add_external_group.png?w=750 750w, /static/img/docs/enterprise/team_add_external_group.png?w=900 900w, /static/img/docs/enterprise/team_add_external_group.png?w=1040 1040w, /static/img/docs/enterprise/team_add_external_group.png?w=1240 1240w, /static/img/docs/enterprise/team_add_external_group.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;&#34;width=&#34;966&#34;height=&#34;347&#34;/&gt;
        &lt;noscript&gt;
          &lt;img
            src=&#34;/static/img/docs/enterprise/team_add_external_group.png&#34;
            alt=&#34;&#34;width=&#34;966&#34;height=&#34;347&#34;class=&#34;docs-image--no-shadow docs-image--right&#34;/&gt;
        &lt;/noscript&gt;&lt;/div&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to Configuration / Teams.&lt;/li&gt;
&lt;li&gt;Select a team.&lt;/li&gt;
&lt;li&gt;Select the External group sync tab and click on the &lt;code&gt;Add group&lt;/code&gt; button.&lt;/li&gt;
&lt;li&gt;Insert LDAP distinguished name (DN) of LDAP group you want to synchronize with the team.&lt;/li&gt;
&lt;li&gt;Click on &lt;code&gt;Add group&lt;/code&gt; button to save.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;clearfix&#34;&gt;&lt;/div&gt;
]]></content><description>&lt;h1 id="enhanced-ldap-integration">Enhanced LDAP Integration&lt;/h1>
&lt;blockquote>
&lt;p>Enhanced LDAP Integration is only available in Grafana Enterprise. Read more about &lt;a href="../../enterprise/">Grafana Enterprise&lt;/a>.&lt;/p>&lt;/blockquote>
&lt;p>The enhanced LDAP integration adds additional functionality on top of the &lt;a href="../ldap/">existing LDAP integration&lt;/a>.&lt;/p></description></item><item><title>GitHub OAuth2 Authentication</title><link>https://grafana.com/docs/grafana/v6.1/auth/github/</link><pubDate>Tue, 14 Apr 2026 18:51:29 +0000</pubDate><guid>https://grafana.com/docs/grafana/v6.1/auth/github/</guid><content><![CDATA[&lt;h1 id=&#34;github-oauth2-authentication&#34;&gt;GitHub OAuth2 Authentication&lt;/h1&gt;
&lt;p&gt;To enable the GitHub OAuth2 you must register your application with GitHub. GitHub will generate a client ID and secret key for you to use.&lt;/p&gt;
&lt;h2 id=&#34;configure-github-oauth-application&#34;&gt;Configure GitHub OAuth application&lt;/h2&gt;
&lt;p&gt;You need to create a GitHub OAuth application (you find this under the GitHub
settings page). When you create the application you will need to specify
a callback URL. Specify this as callback:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;http://&amp;lt;my_grafana_server_name_or_ip&amp;gt;:&amp;lt;grafana_server_port&amp;gt;/login/github&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This callback URL must match the full HTTP address that you use in your
browser to access Grafana, but with the prefix path of &lt;code&gt;/login/github&lt;/code&gt;.
When the GitHub OAuth application is created you will get a Client ID and a
Client Secret. Specify these in the Grafana configuration file. For
example:&lt;/p&gt;
&lt;h2 id=&#34;enable-github-in-grafana&#34;&gt;Enable GitHub in Grafana&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.github]
enabled = true
allow_sign_up = true
client_id = YOUR_GITHUB_APP_CLIENT_ID
client_secret = YOUR_GITHUB_APP_CLIENT_SECRET
scopes = user:email,read:org
auth_url = https://github.com/login/oauth/authorize
token_url = https://github.com/login/oauth/access_token
api_url = https://api.github.com/user
team_ids =
allowed_organizations =&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You may have to set the &lt;code&gt;root_url&lt;/code&gt; option of &lt;code&gt;[server]&lt;/code&gt; for the callback URL to be
correct. For example in case you are serving Grafana behind a proxy.&lt;/p&gt;
&lt;p&gt;Restart the Grafana back-end. You should now see a GitHub login button
on the login page. You can now login or sign up with your GitHub
accounts.&lt;/p&gt;
&lt;p&gt;You may allow users to sign-up via GitHub authentication by setting the
&lt;code&gt;allow_sign_up&lt;/code&gt; option to &lt;code&gt;true&lt;/code&gt;. When this option is set to &lt;code&gt;true&lt;/code&gt;, any
user successfully authenticating via GitHub authentication will be
automatically signed up.&lt;/p&gt;
&lt;h3 id=&#34;team_ids&#34;&gt;team_ids&lt;/h3&gt;
&lt;p&gt;Require an active team membership for at least one of the given teams on
GitHub. If the authenticated user isn&amp;rsquo;t a member of at least one of the
teams they will not be able to register or authenticate with your
Grafana instance. For example:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.github]
enabled = true
client_id = YOUR_GITHUB_APP_CLIENT_ID
client_secret = YOUR_GITHUB_APP_CLIENT_SECRET
scopes = user:email,read:org
team_ids = 150,300
auth_url = https://github.com/login/oauth/authorize
token_url = https://github.com/login/oauth/access_token
api_url = https://api.github.com/user
allow_sign_up = true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;allowed_organizations&#34;&gt;allowed_organizations&lt;/h3&gt;
&lt;p&gt;Require an active organization membership for at least one of the given
organizations on GitHub. If the authenticated user isn&amp;rsquo;t a member of at least
one of the organizations they will not be able to register or authenticate with
your Grafana instance. For example&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.github]
enabled = true
client_id = YOUR_GITHUB_APP_CLIENT_ID
client_secret = YOUR_GITHUB_APP_CLIENT_SECRET
scopes = user:email,read:org
auth_url = https://github.com/login/oauth/authorize
token_url = https://github.com/login/oauth/access_token
api_url = https://api.github.com/user
allow_sign_up = true
# space-delimited organization names
allowed_organizations = github google&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="github-oauth2-authentication">GitHub OAuth2 Authentication&lt;/h1>
&lt;p>To enable the GitHub OAuth2 you must register your application with GitHub. GitHub will generate a client ID and secret key for you to use.&lt;/p></description></item><item><title>GitLab OAuth2 Authentication</title><link>https://grafana.com/docs/grafana/v6.1/auth/gitlab/</link><pubDate>Tue, 14 Apr 2026 18:51:29 +0000</pubDate><guid>https://grafana.com/docs/grafana/v6.1/auth/gitlab/</guid><content><![CDATA[&lt;h1 id=&#34;gitlab-oauth2-authentication&#34;&gt;GitLab OAuth2 Authentication&lt;/h1&gt;
&lt;p&gt;To enable the GitLab OAuth2 you must register an application in GitLab. GitLab will generate a client ID and secret key for you to use.&lt;/p&gt;
&lt;h2 id=&#34;create-gitlab-oauth-keys&#34;&gt;Create GitLab OAuth keys&lt;/h2&gt;
&lt;p&gt;You need to &lt;a href=&#34;https://docs.gitlab.com/ce/integration/oauth_provider.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;create a GitLab OAuth application&lt;/a&gt;.
Choose a descriptive &lt;em&gt;Name&lt;/em&gt;, and use the following &lt;em&gt;Redirect URI&lt;/em&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;https://grafana.example.com/login/gitlab&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;where &lt;code&gt;https://grafana.example.com&lt;/code&gt; is the URL you use to connect to Grafana.
Adjust it as needed if you don&amp;rsquo;t use HTTPS or if you use a different port; for
instance, if you access Grafana at &lt;code&gt;http://203.0.113.31:3000&lt;/code&gt;, you should use&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;http://203.0.113.31:3000/login/gitlab&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Finally, select &lt;em&gt;api&lt;/em&gt; as the &lt;em&gt;Scope&lt;/em&gt; and submit the form. Note that if you&amp;rsquo;re
not going to use GitLab groups for authorization (i.e. not setting
&lt;code&gt;allowed_groups&lt;/code&gt;, see below), you can select &lt;em&gt;read_user&lt;/em&gt; instead of &lt;em&gt;api&lt;/em&gt; as
the &lt;em&gt;Scope&lt;/em&gt;, thus giving a more restricted access to your GitLab API.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll get an &lt;em&gt;Application Id&lt;/em&gt; and a &lt;em&gt;Secret&lt;/em&gt; in return; we&amp;rsquo;ll call them
&lt;code&gt;GITLAB_APPLICATION_ID&lt;/code&gt; and &lt;code&gt;GITLAB_SECRET&lt;/code&gt; respectively for the rest of this
section.&lt;/p&gt;
&lt;h2 id=&#34;enable-gitlab-in-grafana&#34;&gt;Enable GitLab in Grafana&lt;/h2&gt;
&lt;p&gt;Add the following to your Grafana configuration file to enable GitLab
authentication:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.gitlab]
enabled = true
allow_sign_up = false
client_id = GITLAB_APPLICATION_ID
client_secret = GITLAB_SECRET
scopes = api
auth_url = https://gitlab.com/oauth/authorize
token_url = https://gitlab.com/oauth/token
api_url = https://gitlab.com/api/v4
allowed_groups =&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You may have to set the &lt;code&gt;root_url&lt;/code&gt; option of &lt;code&gt;[server]&lt;/code&gt; for the callback URL to be
correct. For example in case you are serving Grafana behind a proxy.&lt;/p&gt;
&lt;p&gt;Restart the Grafana backend for your changes to take effect.&lt;/p&gt;
&lt;p&gt;If you use your own instance of GitLab instead of &lt;code&gt;gitlab.com&lt;/code&gt;, adjust
&lt;code&gt;auth_url&lt;/code&gt;, &lt;code&gt;token_url&lt;/code&gt; and &lt;code&gt;api_url&lt;/code&gt; accordingly by replacing the &lt;code&gt;gitlab.com&lt;/code&gt;
hostname with your own.&lt;/p&gt;
&lt;p&gt;With &lt;code&gt;allow_sign_up&lt;/code&gt; set to &lt;code&gt;false&lt;/code&gt;, only existing users will be able to login
using their GitLab account, but with &lt;code&gt;allow_sign_up&lt;/code&gt; set to &lt;code&gt;true&lt;/code&gt;, &lt;em&gt;any&lt;/em&gt; user
who can authenticate on GitLab will be able to login on your Grafana instance;
if you use the public &lt;code&gt;gitlab.com&lt;/code&gt;, it means anyone in the world would be able
to login on your Grafana instance.&lt;/p&gt;
&lt;p&gt;You can can however limit access to only members of a given group or list of
groups by setting the &lt;code&gt;allowed_groups&lt;/code&gt; option.&lt;/p&gt;
&lt;h3 id=&#34;allowed_groups&#34;&gt;allowed_groups&lt;/h3&gt;
&lt;p&gt;To limit access to authenticated users that are members of one or more &lt;a href=&#34;https://docs.gitlab.com/ce/user/group/index.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;GitLab
groups&lt;/a&gt;, set &lt;code&gt;allowed_groups&lt;/code&gt;
to a comma- or space-separated list of groups. For instance, if you want to
only give access to members of the &lt;code&gt;example&lt;/code&gt; group, set&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;ini&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-ini&#34;&gt;allowed_groups = example&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If you want to also give access to members of the subgroup &lt;code&gt;bar&lt;/code&gt;, which is in
the group &lt;code&gt;foo&lt;/code&gt;, set&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;ini&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-ini&#34;&gt;allowed_groups = example, foo/bar&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note that in GitLab, the group or subgroup name doesn&amp;rsquo;t always match its
display name, especially if the display name contains spaces or special
characters. Make sure you always use the group or subgroup name as it appears
in the URL of the group or subgroup.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a complete example with &lt;code&gt;allow_sign_up&lt;/code&gt; enabled, and access limited to
the &lt;code&gt;example&lt;/code&gt; and &lt;code&gt;foo/bar&lt;/code&gt; groups:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;ini&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-ini&#34;&gt;[auth.gitlab]
enabled = true
allow_sign_up = true
client_id = GITLAB_APPLICATION_ID
client_secret = GITLAB_SECRET
scopes = api
auth_url = https://gitlab.com/oauth/authorize
token_url = https://gitlab.com/oauth/token
api_url = https://gitlab.com/api/v4
allowed_groups = example, foo/bar&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="gitlab-oauth2-authentication">GitLab OAuth2 Authentication&lt;/h1>
&lt;p>To enable the GitLab OAuth2 you must register an application in GitLab. GitLab will generate a client ID and secret key for you to use.&lt;/p></description></item><item><title>Google OAuth2 Authentication</title><link>https://grafana.com/docs/grafana/v6.1/auth/google/</link><pubDate>Tue, 14 Apr 2026 18:51:29 +0000</pubDate><guid>https://grafana.com/docs/grafana/v6.1/auth/google/</guid><content><![CDATA[&lt;h1 id=&#34;google-oauth2-authentication&#34;&gt;Google OAuth2 Authentication&lt;/h1&gt;
&lt;p&gt;To enable the Google OAuth2 you must register your application with Google. Google will generate a client ID and secret key for you to use.&lt;/p&gt;
&lt;h2 id=&#34;create-google-oauth-keys&#34;&gt;Create Google OAuth keys&lt;/h2&gt;
&lt;p&gt;First, you need to create a Google OAuth Client:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;a href=&#34;https://console.developers.google.com/apis/credentials&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://console.developers.google.com/apis/credentials&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Click the &amp;lsquo;Create Credentials&amp;rsquo; button, then click &amp;lsquo;OAuth Client ID&amp;rsquo; in the menu that drops down&lt;/li&gt;
&lt;li&gt;Enter the following:
&lt;ul&gt;
&lt;li&gt;Application Type: Web Application&lt;/li&gt;
&lt;li&gt;Name: Grafana&lt;/li&gt;
&lt;li&gt;Authorized Javascript Origins: &lt;a href=&#34;https://grafana.mycompany.com&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://grafana.mycompany.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Authorized Redirect URLs: &lt;a href=&#34;https://grafana.mycompany.com/login/google&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://grafana.mycompany.com/login/google&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Replace &lt;a href=&#34;https://grafana.mycompany.com&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://grafana.mycompany.com&lt;/a&gt; with the URL of your Grafana instance.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click Create&lt;/li&gt;
&lt;li&gt;Copy the Client ID and Client Secret from the &amp;lsquo;OAuth Client&amp;rsquo; modal&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;enable-google-oauth-in-grafana&#34;&gt;Enable Google OAuth in Grafana&lt;/h2&gt;
&lt;p&gt;Specify the Client ID and Secret in the &lt;a href=&#34;../../installation/configuration/#config-file-locations&#34;&gt;Grafana configuration file&lt;/a&gt;. For example:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.google]
enabled = true
client_id = CLIENT_ID
client_secret = CLIENT_SECRET
scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
auth_url = https://accounts.google.com/o/oauth2/auth
token_url = https://accounts.google.com/o/oauth2/token
allowed_domains = mycompany.com mycompany.org
allow_sign_up = true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You may have to set the &lt;code&gt;root_url&lt;/code&gt; option of &lt;code&gt;[server]&lt;/code&gt; for the callback URL to be
correct. For example in case you are serving Grafana behind a proxy.&lt;/p&gt;
&lt;p&gt;Restart the Grafana back-end. You should now see a Google login button
on the login page. You can now login or sign up with your Google
accounts. The &lt;code&gt;allowed_domains&lt;/code&gt; option is optional, and domains were separated by space.&lt;/p&gt;
&lt;p&gt;You may allow users to sign-up via Google authentication by setting the
&lt;code&gt;allow_sign_up&lt;/code&gt; option to &lt;code&gt;true&lt;/code&gt;. When this option is set to &lt;code&gt;true&lt;/code&gt;, any
user successfully authenticating via Google authentication will be
automatically signed up.&lt;/p&gt;
]]></content><description>&lt;h1 id="google-oauth2-authentication">Google OAuth2 Authentication&lt;/h1>
&lt;p>To enable the Google OAuth2 you must register your application with Google. Google will generate a client ID and secret key for you to use.&lt;/p></description></item><item><title>LDAP Authentication</title><link>https://grafana.com/docs/grafana/v6.1/auth/ldap/</link><pubDate>Tue, 14 Apr 2026 18:51:29 +0000</pubDate><guid>https://grafana.com/docs/grafana/v6.1/auth/ldap/</guid><content><![CDATA[&lt;h1 id=&#34;ldap-authentication&#34;&gt;LDAP Authentication&lt;/h1&gt;
&lt;p&gt;The LDAP integration in Grafana allows your Grafana users to login with their LDAP credentials. You can also specify mappings between LDAP
group memberships and Grafana Organization user roles.&lt;/p&gt;
&lt;h2 id=&#34;supported-ldap-servers&#34;&gt;Supported LDAP Servers&lt;/h2&gt;
&lt;p&gt;Grafana uses a &lt;a href=&#34;https://github.com/go-ldap/ldap&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;third-party LDAP library&lt;/a&gt; under the hood that supports basic LDAP v3 functionality.
This means that you should be able to configure LDAP integration using any compliant LDAPv3 server, for example &lt;a href=&#34;#openldap&#34;&gt;OpenLDAP&lt;/a&gt; or
&lt;a href=&#34;#active-directory&#34;&gt;Active Directory&lt;/a&gt; among &lt;a href=&#34;https://en.wikipedia.org/wiki/Directory_service#LDAP_implementations&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;others&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;enable-ldap&#34;&gt;Enable LDAP&lt;/h2&gt;
&lt;p&gt;In order to use LDAP integration you&amp;rsquo;ll first need to enable LDAP in the &lt;a href=&#34;../../installation/configuration/&#34;&gt;main config file&lt;/a&gt; as well as specify the path to the LDAP
specific configuration file (default: &lt;code&gt;/etc/grafana/ldap.toml&lt;/code&gt;).&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.ldap]
# Set to `true` to enable LDAP integration (default: `false`)
enabled = true

# Path to the LDAP specific configuration file (default: `/etc/grafana/ldap.toml`)
config_file = /etc/grafana/ldap.toml

# Allow sign up should almost always be true (default) to allow new Grafana users to be created (if ldap authentication is ok). If set to
# false only pre-existing Grafana users will be able to login (if ldap authentication is ok).
allow_sign_up = true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;grafana-ldap-configuration&#34;&gt;Grafana LDAP Configuration&lt;/h2&gt;
&lt;p&gt;Depending on which LDAP server you&amp;rsquo;re using and how that&amp;rsquo;s configured your Grafana LDAP configuration may vary.
See &lt;a href=&#34;#configuration-examples&#34;&gt;configuration examples&lt;/a&gt; for more information.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;LDAP specific configuration file (ldap.toml) example:&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[[servers]]
# Ldap server host (specify multiple hosts space separated)
host = &amp;#34;127.0.0.1&amp;#34;
# Default port is 389 or 636 if use_ssl = true
port = 389
# Set to true if ldap server supports TLS
use_ssl = false
# Set to true if connect ldap server with STARTTLS pattern (create connection in insecure, then upgrade to secure connection with TLS)
start_tls = false
# set to true if you want to skip ssl cert validation
ssl_skip_verify = false
# set to the path to your root CA certificate or leave unset to use system defaults
# root_ca_cert = &amp;#34;/path/to/certificate.crt&amp;#34;
# Authentication against LDAP servers requiring client certificates
# client_cert = &amp;#34;/path/to/client.crt&amp;#34;
# client_key = &amp;#34;/path/to/client.key&amp;#34;

# Search user bind dn
bind_dn = &amp;#34;cn=admin,dc=grafana,dc=org&amp;#34;
# Search user bind password
# If the password contains # or ; you have to wrap it with triple quotes. Ex &amp;#34;&amp;#34;&amp;#34;#password;&amp;#34;&amp;#34;&amp;#34;
bind_password = &amp;#39;grafana&amp;#39;

# User search filter, for example &amp;#34;(cn=%s)&amp;#34; or &amp;#34;(sAMAccountName=%s)&amp;#34; or &amp;#34;(uid=%s)&amp;#34;
# Allow login from email or username, example &amp;#34;(|(sAMAccountName=%s)(userPrincipalName=%s))&amp;#34;
search_filter = &amp;#34;(cn=%s)&amp;#34;

# An array of base dns to search through
search_base_dns = [&amp;#34;dc=grafana,dc=org&amp;#34;]

# group_search_filter = &amp;#34;(&amp;amp;(objectClass=posixGroup)(memberUid=%s))&amp;#34;
# group_search_filter_user_attribute = &amp;#34;distinguishedName&amp;#34;
# group_search_base_dns = [&amp;#34;ou=groups,dc=grafana,dc=org&amp;#34;]

# Specify names of the ldap attributes your ldap uses
[servers.attributes]
name = &amp;#34;givenName&amp;#34;
surname = &amp;#34;sn&amp;#34;
username = &amp;#34;cn&amp;#34;
member_of = &amp;#34;memberOf&amp;#34;
email =  &amp;#34;email&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;bind&#34;&gt;Bind&lt;/h3&gt;
&lt;h4 id=&#34;bind--bind-password&#34;&gt;Bind &amp;amp; Bind Password&lt;/h4&gt;
&lt;p&gt;By default the configuration expects you to specify a bind DN and bind password. This should be a read only user that can perform LDAP searches.
When the user DN is found a second bind is performed with the user provided username &amp;amp; password (in the normal Grafana login form).&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;bind_dn = &amp;#34;cn=admin,dc=grafana,dc=org&amp;#34;
bind_password = &amp;#34;grafana&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h4 id=&#34;single-bind-example&#34;&gt;Single Bind Example&lt;/h4&gt;
&lt;p&gt;If you can provide a single bind expression that matches all possible users, you can skip the second bind and bind against the user DN directly.
This allows you to not specify a bind_password in the configuration file.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;bind_dn = &amp;#34;cn=%s,o=users,dc=grafana,dc=org&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In this case you skip providing a &lt;code&gt;bind_password&lt;/code&gt; and instead provide a &lt;code&gt;bind_dn&lt;/code&gt; value with a &lt;code&gt;%s&lt;/code&gt; somewhere. This will be replaced with the username entered in on the Grafana login page.
The search filter and search bases settings are still needed to perform the LDAP search to retrieve the other LDAP information (like LDAP groups and email).&lt;/p&gt;
&lt;h3 id=&#34;posix-schema&#34;&gt;POSIX schema&lt;/h3&gt;
&lt;p&gt;If your ldap server does not support the memberOf attribute add these options:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;## Group search filter, to retrieve the groups of which the user is a member (only set if memberOf attribute is not available)
group_search_filter = &amp;#34;(&amp;amp;(objectClass=posixGroup)(memberUid=%s))&amp;#34;
## An array of the base DNs to search through for groups. Typically uses ou=groups
group_search_base_dns = [&amp;#34;ou=groups,dc=grafana,dc=org&amp;#34;]
## the %s in the search filter will be replaced with the attribute defined below
group_search_filter_user_attribute = &amp;#34;uid&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Also set &lt;code&gt;member_of = &amp;quot;dn&amp;quot;&lt;/code&gt; in the &lt;code&gt;[servers.attributes]&lt;/code&gt; section.&lt;/p&gt;
&lt;h3 id=&#34;group-mappings&#34;&gt;Group Mappings&lt;/h3&gt;
&lt;p&gt;In &lt;code&gt;[[servers.group_mappings]]&lt;/code&gt; you can map an LDAP group to a Grafana organization and role.  These will be synced every time the user logs in, with LDAP being
the authoritative source. So, if you change a user&amp;rsquo;s role in the Grafana Org. Users page, this change will be reset the next time the user logs in. If you
change the LDAP groups of a user, the change will take effect the next time the user logs in.&lt;/p&gt;
&lt;p&gt;The first group mapping that an LDAP user is matched to will be used for the sync. If you have LDAP users that fit multiple mappings, the topmost mapping in the
TOML config will be used.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;LDAP specific configuration file (ldap.toml) example:&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[[servers]]
# other settings omitted for clarity

[[servers.group_mappings]]
group_dn = &amp;#34;cn=superadmins,dc=grafana,dc=org&amp;#34;
org_role = &amp;#34;Admin&amp;#34;
grafana_admin = true # Available in Grafana v5.3 and above

[[servers.group_mappings]]
group_dn = &amp;#34;cn=admins,dc=grafana,dc=org&amp;#34;
org_role = &amp;#34;Admin&amp;#34;

[[servers.group_mappings]]
group_dn = &amp;#34;cn=users,dc=grafana,dc=org&amp;#34;
org_role = &amp;#34;Editor&amp;#34;

[[servers.group_mappings]]
group_dn = &amp;#34;*&amp;#34;
org_role = &amp;#34;Viewer&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Setting&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;group_dn&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;LDAP distinguished name (DN) of LDAP group. If you want to match all (or no LDAP groups) then you can use wildcard (&lt;code&gt;&amp;quot;*&amp;quot;&lt;/code&gt;)&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;org_role&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Assign users of &lt;code&gt;group_dn&lt;/code&gt; the organization role &lt;code&gt;&amp;quot;Admin&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;Editor&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;Viewer&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;org_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;No&lt;/td&gt;
              &lt;td&gt;The Grafana organization database id. Setting this allows for multiple group_dn&amp;rsquo;s to be assigned to the same &lt;code&gt;org_role&lt;/code&gt; provided the &lt;code&gt;org_id&lt;/code&gt; differs&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1&lt;/code&gt; (default org id)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;grafana_admin&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;No&lt;/td&gt;
              &lt;td&gt;When &lt;code&gt;true&lt;/code&gt; makes user of &lt;code&gt;group_dn&lt;/code&gt; Grafana server admin. A Grafana server admin has admin access over all organizations and users. Available in Grafana v5.3 and above&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;nestedrecursive-group-membership&#34;&gt;Nested/recursive group membership&lt;/h3&gt;
&lt;p&gt;Users with nested/recursive group membership must have an LDAP server that supports &lt;code&gt;LDAP_MATCHING_RULE_IN_CHAIN&lt;/code&gt;
and configure &lt;code&gt;group_search_filter&lt;/code&gt; in a way that it returns the groups the submitted username is a member of.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Active Directory example:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Active Directory groups store the Distinguished Names (DNs) of members, so your filter will need to know the DN for the user based only on the submitted username.
Multiple DN templates can be searched by combining filters with the LDAP OR-operator. Examples:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;group_search_filter = &amp;#34;(member:1.2.840.113556.1.4.1941:=CN=%s,[user container/OU])&amp;#34;
group_search_filter = &amp;#34;(|(member:1.2.840.113556.1.4.1941:=CN=%s,[user container/OU])(member:1.2.840.113556.1.4.1941:=CN=%s,[another user container/OU]))&amp;#34;
group_search_filter_user_attribute = &amp;#34;cn&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For more information on AD searches see &lt;a href=&#34;https://docs.microsoft.com/en-us/windows/desktop/adsi/search-filter-syntax&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Microsoft&amp;rsquo;s Search Filter Syntax&lt;/a&gt; documentation.&lt;/p&gt;
&lt;p&gt;For troubleshooting, by changing &lt;code&gt;member_of&lt;/code&gt; in &lt;code&gt;[servers.attributes]&lt;/code&gt; to &amp;ldquo;dn&amp;rdquo; it will show you more accurate group memberships when &lt;a href=&#34;#troubleshooting&#34;&gt;debug is enabled&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;configuration-examples&#34;&gt;Configuration examples&lt;/h2&gt;
&lt;h3 id=&#34;openldap&#34;&gt;OpenLDAP&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;http://www.openldap.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenLDAP&lt;/a&gt; is an open source directory service.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;LDAP specific configuration file (ldap.toml):&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[[servers]]
host = &amp;#34;127.0.0.1&amp;#34;
port = 389
use_ssl = false
start_tls = false
ssl_skip_verify = false
bind_dn = &amp;#34;cn=admin,dc=grafana,dc=org&amp;#34;
bind_password = &amp;#39;grafana&amp;#39;
search_filter = &amp;#34;(cn=%s)&amp;#34;
search_base_dns = [&amp;#34;dc=grafana,dc=org&amp;#34;]

[servers.attributes]
name = &amp;#34;givenName&amp;#34;
surname = &amp;#34;sn&amp;#34;
username = &amp;#34;cn&amp;#34;
member_of = &amp;#34;memberOf&amp;#34;
email =  &amp;#34;email&amp;#34;

# [[servers.group_mappings]] omitted for clarity&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;active-directory&#34;&gt;Active Directory&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://technet.microsoft.com/en-us/library/hh831484%28v=ws.11%29.aspx&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Active Directory&lt;/a&gt; is a directory service which is commonly used in Windows environments.&lt;/p&gt;
&lt;p&gt;Assuming the following Active Directory server setup:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;IP address: &lt;code&gt;10.0.0.1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Domain: &lt;code&gt;CORP&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;DNS name: &lt;code&gt;corp.local&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;LDAP specific configuration file (ldap.toml):&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[[servers]]
host = &amp;#34;10.0.0.1&amp;#34;
port = 3269
use_ssl = true
start_tls = false
ssl_skip_verify = true
bind_dn = &amp;#34;CORP\\%s&amp;#34;
search_filter = &amp;#34;(sAMAccountName=%s)&amp;#34;
search_base_dns = [&amp;#34;dc=corp,dc=local&amp;#34;]

[servers.attributes]
name = &amp;#34;givenName&amp;#34;
surname = &amp;#34;sn&amp;#34;
username = &amp;#34;sAMAccountName&amp;#34;
member_of = &amp;#34;memberOf&amp;#34;
email =  &amp;#34;mail&amp;#34;

# [[servers.group_mappings]] omitted for clarity&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h4 id=&#34;port-requirements&#34;&gt;Port requirements&lt;/h4&gt;
&lt;p&gt;In above example SSL is enabled and an encrypted port have been configured. If your Active Directory don&amp;rsquo;t support SSL please change &lt;code&gt;enable_ssl = false&lt;/code&gt; and &lt;code&gt;port = 389&lt;/code&gt;.
Please inspect your Active Directory configuration and documentation to find the correct settings. For more information about Active Directory and port requirements see &lt;a href=&#34;https://technet.microsoft.com/en-us/library/dd772723%28v=ws.10%29&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;link&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;troubleshooting&#34;&gt;Troubleshooting&lt;/h2&gt;
&lt;p&gt;To troubleshoot and get more log info enable ldap debug logging in the &lt;a href=&#34;../../installation/configuration/&#34;&gt;main config file&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[log]
filters = ldap:debug&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="ldap-authentication">LDAP Authentication&lt;/h1>
&lt;p>The LDAP integration in Grafana allows your Grafana users to login with their LDAP credentials. You can also specify mappings between LDAP
group memberships and Grafana Organization user roles.&lt;/p></description></item><item><title>OAuth authentication</title><link>https://grafana.com/docs/grafana/v6.1/auth/generic-oauth/</link><pubDate>Tue, 14 Apr 2026 18:51:29 +0000</pubDate><guid>https://grafana.com/docs/grafana/v6.1/auth/generic-oauth/</guid><content><![CDATA[&lt;h1 id=&#34;generic-oauth-authentication&#34;&gt;Generic OAuth Authentication&lt;/h1&gt;
&lt;p&gt;You can configure many different oauth2 authentication services with Grafana using the generic oauth2 feature. Below you
can find examples using Okta, BitBucket, OneLogin and Azure.&lt;/p&gt;
&lt;p&gt;This callback URL must match the full HTTP address that you use in your browser to access Grafana, but with the prefix path of &lt;code&gt;/login/generic_oauth&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You may have to set the &lt;code&gt;root_url&lt;/code&gt; option of &lt;code&gt;[server]&lt;/code&gt; for the callback URL to be
correct. For example in case you are serving Grafana behind a proxy.&lt;/p&gt;
&lt;p&gt;Example config:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.generic_oauth]
enabled = true
client_id = YOUR_APP_CLIENT_ID
client_secret = YOUR_APP_CLIENT_SECRET
scopes =
auth_url =
token_url =
api_url =
allowed_domains = mycompany.com mycompany.org
allow_sign_up = true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Set &lt;code&gt;api_url&lt;/code&gt; to the resource that returns &lt;a href=&#34;https://connect2id.com/products/server/docs/api/userinfo&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenID UserInfo&lt;/a&gt; compatible information.&lt;/p&gt;
&lt;p&gt;Grafana will attempt to determine the user&amp;rsquo;s e-mail address by querying the OAuth provider as described below in the following order until an e-mail address is found:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check for the presence of an e-mail address via the &lt;code&gt;email&lt;/code&gt; field encoded in the OAuth &lt;code&gt;id_token&lt;/code&gt; parameter.&lt;/li&gt;
&lt;li&gt;Check for the presence of an e-mail address in the &lt;code&gt;attributes&lt;/code&gt; map encoded in the OAuth &lt;code&gt;id_token&lt;/code&gt; parameter. By default Grafana will perform a lookup into the attributes map using the &lt;code&gt;email:primary&lt;/code&gt; key, however, this is configurable and can be adjusted by using the &lt;code&gt;email_attribute_name&lt;/code&gt; configuration option.&lt;/li&gt;
&lt;li&gt;Query the &lt;code&gt;/emails&lt;/code&gt; endpoint of the OAuth provider&amp;rsquo;s API (configured with &lt;code&gt;api_url&lt;/code&gt;) and check for the presence of an e-mail address marked as a primary address.&lt;/li&gt;
&lt;li&gt;If no e-mail address is found in steps (1-3), then the e-mail address of the user is set to the empty string.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;set-up-oauth2-with-okta&#34;&gt;Set up OAuth2 with Okta&lt;/h2&gt;
&lt;p&gt;First set up Grafana as an OpenId client &amp;ldquo;webapplication&amp;rdquo; in Okta. Then set the Base URIs to &lt;code&gt;https://&amp;lt;grafana domain&amp;gt;/&lt;/code&gt; and set the Login redirect URIs to &lt;code&gt;https://&amp;lt;grafana domain&amp;gt;/login/generic_oauth&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Finally set up the generic oauth module like this:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.generic_oauth]
name = Okta
enabled = true
scopes = openid profile email
client_id = &amp;lt;okta application Client ID&amp;gt;
client_secret = &amp;lt;okta application Client Secret&amp;gt;
auth_url = https://&amp;lt;okta domain&amp;gt;/oauth2/v1/authorize
token_url = https://&amp;lt;okta domain&amp;gt;/oauth2/v1/token
api_url = https://&amp;lt;okta domain&amp;gt;/oauth2/v1/userinfo&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;set-up-oauth2-with-bitbucket&#34;&gt;Set up OAuth2 with Bitbucket&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.generic_oauth]
name = BitBucket
enabled = true
allow_sign_up = true
client_id = &amp;lt;client id&amp;gt;
client_secret = &amp;lt;client secret&amp;gt;
scopes = account email
auth_url = https://bitbucket.org/site/oauth2/authorize
token_url = https://bitbucket.org/site/oauth2/access_token
api_url = https://api.bitbucket.org/2.0/user
team_ids =
allowed_organizations =&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;set-up-oauth2-with-onelogin&#34;&gt;Set up OAuth2 with OneLogin&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a new Custom Connector with the following settings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Name: Grafana&lt;/li&gt;
&lt;li&gt;Sign On Method: OpenID Connect&lt;/li&gt;
&lt;li&gt;Redirect URI: &lt;code&gt;https://&amp;lt;grafana domain&amp;gt;/login/generic_oauth&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Signing Algorithm: RS256&lt;/li&gt;
&lt;li&gt;Login URL: &lt;code&gt;https://&amp;lt;grafana domain&amp;gt;/login/generic_oauth&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;then:&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add an App to the Grafana Connector:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Display Name: Grafana&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;then:&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Under the SSO tab on the Grafana App details page you&amp;rsquo;ll find the Client ID and Client Secret.&lt;/p&gt;
&lt;p&gt;Your OneLogin Domain will match the url you use to access OneLogin.&lt;/p&gt;
&lt;p&gt;Configure Grafana as follows:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.generic_oauth]
name = OneLogin
enabled = true
allow_sign_up = true
client_id = &amp;lt;client id&amp;gt;
client_secret = &amp;lt;client secret&amp;gt;
scopes = openid email name
auth_url = https://&amp;lt;onelogin domain&amp;gt;.onelogin.com/oidc/auth
token_url = https://&amp;lt;onelogin domain&amp;gt;.onelogin.com/oidc/token
api_url = https://&amp;lt;onelogin domain&amp;gt;.onelogin.com/oidc/me
team_ids =
allowed_organizations =&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;set-up-oauth2-with-auth0&#34;&gt;Set up OAuth2 with Auth0&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a new Client in Auth0&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Name: Grafana&lt;/li&gt;
&lt;li&gt;Type: Regular Web Application&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go to the Settings tab and set:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Allowed Callback URLs: &lt;code&gt;https://&amp;lt;grafana domain&amp;gt;/login/generic_oauth&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click Save Changes, then use the values at the top of the page to configure Grafana:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.generic_oauth]
enabled = true
allow_sign_up = true
team_ids =
allowed_organizations =
name = Auth0
client_id = &amp;lt;client id&amp;gt;
client_secret = &amp;lt;client secret&amp;gt;
scopes = openid profile email
auth_url = https://&amp;lt;domain&amp;gt;/authorize
token_url = https://&amp;lt;domain&amp;gt;/oauth/token
api_url = https://&amp;lt;domain&amp;gt;/userinfo&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;set-up-oauth2-with-azure-active-directory&#34;&gt;Set up OAuth2 with Azure Active Directory&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Log in to portal.azure.com and click &amp;ldquo;Azure Active Directory&amp;rdquo; in the side menu, then click the &amp;ldquo;Properties&amp;rdquo; sub-menu item.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy the &amp;ldquo;Directory ID&amp;rdquo;, this is needed for setting URLs later&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click &amp;ldquo;App Registrations&amp;rdquo; and add a new application registration:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Name: Grafana&lt;/li&gt;
&lt;li&gt;Application type: Web app / API&lt;/li&gt;
&lt;li&gt;Sign-on URL: &lt;code&gt;https://&amp;lt;grafana domain&amp;gt;/login/generic_oauth&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click the name of the new application to open the application details page.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Note down the &amp;ldquo;Application ID&amp;rdquo;, this will be the OAuth client id.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click &amp;ldquo;Settings&amp;rdquo;, then click &amp;ldquo;Keys&amp;rdquo; and add a new entry under Passwords&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Key Description: Grafana OAuth&lt;/li&gt;
&lt;li&gt;Duration: Never Expires&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click Save then copy the key value, this will be the OAuth client secret.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure Grafana as follows:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.generic_oauth]
name = Azure AD
enabled = true
allow_sign_up = true
client_id = &amp;lt;application id&amp;gt;
client_secret = &amp;lt;key value&amp;gt;
scopes = openid email name
auth_url = https://login.microsoftonline.com/&amp;lt;directory id&amp;gt;/oauth2/authorize
token_url = https://login.microsoftonline.com/&amp;lt;directory id&amp;gt;/oauth2/token
api_url =
team_ids =
allowed_organizations =&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;Note: It&amp;rsquo;s important to ensure that the &lt;a href=&#34;/installation/configuration/#root-url&#34;&gt;root_url&lt;/a&gt; in Grafana is set in your Azure Application Reply URLs (App -&amp;gt; Settings -&amp;gt; Reply URLs)&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;set-up-oauth2-with-centrify&#34;&gt;Set up OAuth2 with Centrify&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a new Custom OpenID Connect application configuration in the Centrify dashboard.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a memorable unique Application ID, e.g. &amp;ldquo;grafana&amp;rdquo;, &amp;ldquo;grafana_aws&amp;rdquo;, etc.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Put in other basic configuration (name, description, logo, category)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On the Trust tab, generate a long password and put it into the OpenID Connect Client Secret field.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Put the URL to the front page of your Grafana instance into the &amp;ldquo;Resource Application URL&amp;rdquo; field.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add an authorized Redirect URI like https://your-grafana-server/login/generic_oauth&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set up permissions, policies, etc. just like any other Centrify app&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure Grafana as follows:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.generic_oauth]
name = Centrify
enabled = true
allow_sign_up = true
client_id = &amp;lt;OpenID Connect Client ID from Centrify&amp;gt;
client_secret = &amp;lt;your generated OpenID Connect Client Sercret&amp;#34;
scopes = openid email name
auth_url = https://&amp;lt;your domain&amp;gt;.my.centrify.com/OAuth2/Authorize/&amp;lt;Application ID&amp;gt;
token_url = https://&amp;lt;your domain&amp;gt;.my.centrify.com/OAuth2/Token/&amp;lt;Application ID&amp;gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;set-up-oauth2-with-non-compliant-providers&#34;&gt;Set up OAuth2 with non-compliant providers&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Only available in Grafana v6.0 and above.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Some OAuth2 providers might not support &lt;code&gt;client_id&lt;/code&gt; and &lt;code&gt;client_secret&lt;/code&gt; passed via Basic Authentication HTTP header, which
results in &lt;code&gt;invalid_client&lt;/code&gt; error. To allow Grafana to authenticate via these type of providers, the client identifiers must be
send via POST body, which can be enabled via the following settings:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.generic_oauth]
send_client_credentials_via_post = true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;hr&gt;
]]></content><description>&lt;h1 id="generic-oauth-authentication">Generic OAuth Authentication&lt;/h1>
&lt;p>You can configure many different oauth2 authentication services with Grafana using the generic oauth2 feature. Below you
can find examples using Okta, BitBucket, OneLogin and Azure.&lt;/p></description></item><item><title>Overview</title><link>https://grafana.com/docs/grafana/v6.1/auth/overview/</link><pubDate>Tue, 14 Apr 2026 18:51:29 +0000</pubDate><guid>https://grafana.com/docs/grafana/v6.1/auth/overview/</guid><content><![CDATA[&lt;h1 id=&#34;user-authentication-overview&#34;&gt;User Authentication Overview&lt;/h1&gt;
&lt;p&gt;Grafana provides many ways to authenticate users. Some authentication integrations also enable syncing user
permissions and org memberships.&lt;/p&gt;
&lt;h2 id=&#34;oauth-integrations&#34;&gt;OAuth Integrations&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../google/&#34;&gt;Google OAuth&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../github/&#34;&gt;GitHub OAuth&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../gitlab/&#34;&gt;Gitlab OAuth&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../generic-oauth/&#34;&gt;Generic OAuth&lt;/a&gt; (Okta2, BitBucket, Azure, OneLogin, Auth0)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;ldap-integrations&#34;&gt;LDAP integrations&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../ldap/&#34;&gt;LDAP Authentication&lt;/a&gt; (OpenLDAP, ActiveDirectory, etc)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;auth-proxy&#34;&gt;Auth proxy&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../auth-proxy/&#34;&gt;Auth Proxy&lt;/a&gt; If you want to handle authentication outside Grafana using a reverse
proxy.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;grafana-auth&#34;&gt;Grafana Auth&lt;/h2&gt;
&lt;p&gt;Grafana of course has a built in user authentication system with password authentication enabled by default. You can
disable authentication by enabling anonymous access. You can also hide login form and only allow login through an auth
provider (listed above). There is also options for allowing self sign up.&lt;/p&gt;
&lt;h3 id=&#34;login-and-short-lived-tokens&#34;&gt;Login and short-lived tokens&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The following applies when using Grafana&amp;rsquo;s built in user authentication, LDAP (without Auth proxy) or OAuth integration.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Grafana are using short-lived tokens as a mechanism for verifying authenticated users.
These short-lived tokens are rotated each &lt;code&gt;token_rotation_interval_minutes&lt;/code&gt; for an active authenticated user.&lt;/p&gt;
&lt;p&gt;An active authenticated user that gets it token rotated will extend the &lt;code&gt;login_maximum_inactive_lifetime_days&lt;/code&gt; time from &amp;ldquo;now&amp;rdquo; that Grafana will remember the user.
This means that a user can close its browser and come back before &lt;code&gt;now &#43; login_maximum_inactive_lifetime_days&lt;/code&gt; and still being authenticated.
This is true as long as the time since user login is less than &lt;code&gt;login_maximum_lifetime_days&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth]

# Login cookie name
login_cookie_name = grafana_session

# The lifetime (days) an authenticated user can be inactive before being required to login at next visit. Default is 7 days.
login_maximum_inactive_lifetime_days = 7

# The maximum lifetime (days) an authenticated user can be logged in since login time before being required to login. Default is 30 days.
login_maximum_lifetime_days = 30

# How often should auth tokens be rotated for authenticated users when being active. The default is each 10 minutes.
token_rotation_interval_minutes = 10&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;anonymous-authentication&#34;&gt;Anonymous authentication&lt;/h3&gt;
&lt;p&gt;You can make Grafana accessible without any login required by enabling anonymous access in the configuration file.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.anonymous]
enabled = true

# Organization name that should be used for unauthenticated users
org_name = Main Org.

# Role for unauthenticated users, other valid values are `Editor` and `Admin`
org_role = Viewer&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If you change your organization name in the Grafana UI this setting needs to be updated to match the new name.&lt;/p&gt;
&lt;h3 id=&#34;basic-authentication&#34;&gt;Basic authentication&lt;/h3&gt;
&lt;p&gt;Basic auth is enabled by default and works with the built in Grafana user password authentication system and LDAP
authentication integration.&lt;/p&gt;
&lt;p&gt;To disable basic auth:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth.basic]
enabled = false&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;disable-login-form&#34;&gt;Disable login form&lt;/h3&gt;
&lt;p&gt;You can hide the Grafana login form using the below configuration settings.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth]
disable_login_form = true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;automatic-oauth-login&#34;&gt;Automatic OAuth login&lt;/h3&gt;
&lt;p&gt;Set to true to attempt login with OAuth automatically, skipping the login screen.
This setting is ignored if multiple OAuth providers are configured.
Defaults to &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth]
oauth_auto_login = true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;hide-sign-out-menu&#34;&gt;Hide sign-out menu&lt;/h3&gt;
&lt;p&gt;Set to the option detailed below to true to hide sign-out menu link. Useful if you use an auth proxy.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth]
disable_signout_menu = true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;url-redirect-after-signing-out&#34;&gt;URL redirect after signing out&lt;/h3&gt;
&lt;p&gt;URL to redirect the user to after signing out from Grafana. This can for example be used to enable signout from oauth provider.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[auth]
signout_redirect_url =&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="user-authentication-overview">User Authentication Overview&lt;/h1>
&lt;p>Grafana provides many ways to authenticate users. Some authentication integrations also enable syncing user
permissions and org memberships.&lt;/p>
&lt;h2 id="oauth-integrations">OAuth Integrations&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="../google/">Google OAuth&lt;/a>&lt;/li>
&lt;li>&lt;a href="../github/">GitHub OAuth&lt;/a>&lt;/li>
&lt;li>&lt;a href="../gitlab/">Gitlab OAuth&lt;/a>&lt;/li>
&lt;li>&lt;a href="../generic-oauth/">Generic OAuth&lt;/a> (Okta2, BitBucket, Azure, OneLogin, Auth0)&lt;/li>
&lt;/ul>
&lt;h2 id="ldap-integrations">LDAP integrations&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="../ldap/">LDAP Authentication&lt;/a> (OpenLDAP, ActiveDirectory, etc)&lt;/li>
&lt;/ul>
&lt;h2 id="auth-proxy">Auth proxy&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="../auth-proxy/">Auth Proxy&lt;/a> If you want to handle authentication outside Grafana using a reverse
proxy.&lt;/li>
&lt;/ul>
&lt;h2 id="grafana-auth">Grafana Auth&lt;/h2>
&lt;p>Grafana of course has a built in user authentication system with password authentication enabled by default. You can
disable authentication by enabling anonymous access. You can also hide login form and only allow login through an auth
provider (listed above). There is also options for allowing self sign up.&lt;/p></description></item></channel></rss>