"Test user mapping" function not working after Grafana update

Hello,

I’m using Grafana Enterprise (unlicensed) self-managed on Windows with a LDAP connector to manage my user’s authentication. Everything worked fine as long as I was in version 11.3.1.

I recently updated Grafana from version 11.3.1 to version 11.5.2. Since, the “Test user mapping” function under Administration > Authentication > LDAP doesn’t work anymore. When I fill a username and click on “run” button, I have an error saying :

An unexpected error happened
Details:
TypeError: right-hand side of 'in' should be an object, got undefined

A looooong detail follows this message, too long to be put here but here is the beginning :

What can be done to resolve this issue ?
Any help is welcome.

Thank you.

Yes. I get exactly this issue also.
Not in V11.4 or V11.3.
I noticed another thread which seems to have been closed with no reply.
A bit more information:
It appears that an invalid user ID responds correctly. In other words if the user is NOT configured in AD/LDAP, then the message “No user was found in the LDAP server(s) with that username” is returned. If the user IS in AD/LDAP, then the error occurs.

I closed it, because there is not point to have multiple topics about the same issue.

1 Like

@jangaraj I noticed you closed my thread, Is here no fix for this?

I closed it because you are 3rd person, who opened topic about this problem. I don’t know if there is solution for that. But please keep discussion in this single topic only, where are all users with this problem.
There is no point that each particular user open new topic, when you can chat/blame/… together here.

I’m in the same situation as you. I used to use the LDAP lookup function to verify users’ groups when querying the LDAP server. Here are the logs showing successful authentication.

Why can’t I use the GUI to look up the user to see which LDAP groups they are in? This used to work fine. Could there have been any recent changes or updates that might have affected this functionality? To me this must be a bug. After updating to the latest Grafana version it broke.

LDAP logs

msg=“Searching for user’s groups” filter=“(member:1.2.840.113556.1.4.1941:=CN=Elliot Williams,OU=Unprivileged Users,OU=Active Users,DC=tsv,DC=oam,DC=eeint,DC=co,DC=uk)”
logger=ldap t=2025-04-08T09:44:49.449847577+01:00 level=debug msg=“LDAP users found” users=“[OAuthToken: , AuthModule: ldap, AuthId: CN=Elliot Williams,OU=Unprivileged Users,OU=Active Users,DC=tsv,DC=oam,DC=eeint,DC=co,DC=uk, UserId: 0, Email: , Login: WILLIAEM, Name: Elliot Williams, Groups: [CN=DG_TSV_Citrix_Allow_Drives,OU=Non-Privileged-DG,OU=Groups,DC=tsv,DC=oam,DC=eeint,DC=co,DC=uk CN=DG_TSV_Necap_Service,OU=Non-Privileged-DG,OU=Groups,DC=tsv,DC=oam,DC=eeint,DC=co,DC=uk CN=DG_TSV_NCM_Service,OU=Non-Privileged-DG,OU=Groups,DC=tsv,DC=oam,DC=eeint,DC=co,DC=uk CN=DG_TSV_NCM_Linux,OU=Non-Privileged-DG,OU=Groups,DC=tsv,DC=oam,DC=eeint,DC=co,DC=uk CN=DG_TSV_NCM_Linux_Admin,OU=Non-Privileged-DG,OU=Groups,DC=tsv,DC=oam,DC=eeint,DC=co,DC=uk CN=DG_TSV_Citrix_Allow_Clipboard,OU=Non-Privileged-DG,OU=Groups,DC=tsv,DC=oam,DC=eeint,DC=co,DC=uk CN=DG_TSV_GRF_Editor,OU=Privileged-DG,OU=Groups,DC=tsv,DC=oam,DC=eeint,DC=co,DC=uk CN=DG_TSV_GRF_Admin,OU=Privileged-DG,OU=Groups,DC=tsv,DC=oam,DC=eeint,DC=co,DC=uk CN=RG_TSV_Service_Configuration_and_Performance,OU=Non-Privileged-RG,OU=Groups,DC=tsv,DC=oam,DC=eeint,DC=co,DC=uk], OrgRoles: map[1:Admin 2:Admin], IsGrafanaAdmin: true, IsDisabled: false, SkipTeamSync: false]”

Hi @jangaraj , I understand you don’t know if there is a solution for this issue right now, but is there a way for you to know if Grafana technical support team is working on it and if we have a chance of seeing a fix soon ? This is a very useful feature as far as I’m concerned (and apparently I’m not the only one), it would be reassuring for us to know that the problem has been identified and that support is working on it. Thank you.

If 3 people complains about it, then there is high chance that there is a GitHub issue for that. So I recommend go to GitHub and search issue there. You might have more details there.

If you have paid Grafana, then you have Grafana support, which you can use.

Actually there is a GitHub issue open for a similar problem indeed : Product Area: Grafana 11.6 OSS fails on LDAP "Test User Mapping" - works on 11.5.3 · Issue #103292 · grafana/grafana · GitHub

Even if there is a difference with the versions concerned by the issue… The GitHub issue says it still worked in version 11.5.3 and earlier, which is wrong as we can read in the present topic. What we learn is that the issue seem to be still present in version 11.6.0 which is the last one, so no solution available for now.

I don’t have 40k$ to put on the table for Grafana Enterprise support so I guess no other choice but wait for a solution to be found in a future version…

You can explore Grafana OSS source code and fix it. Then you can open MR and everybody in this topic will be happy when your fix will be released in the OSS.

I am neither a developer nor a coder, I can’t do that. No offense, I let “Grafana Champions” do the job, they know better than me :wink:

I think you need to update your expectation. “Grafana Champion” role/title is not a paid job - they don’t even work for Grafana Labs. So don’t expect they will fix the code for you. They just help with community - for example: aggregate multiple topics about the same problem into one, point users to the right doc, …