All Apps and Add-ons

Splunk DB Connect 2.2.0: Why am I getting "AttributeError: 'dict' object has no attribute 'user'"

kissgery
Explorer

After installing Splunk DB Connect 2.2.0 I'm getting

External search command 'dbxquery' returned error code 1. Script output = "AttributeError: 'dict' object has no attribute 'user'

independent from the database I'm using. (tried with SQL Server and DB2)
Connection setting says Valid connection. Any idea why?

1 Solution

sumants
Engager

It has to do with the user permissions. Try assigning "db_connect_user" role to the user (currently executing the query) directly from the Access controls » Users page. At least that is what resolve my problem.
Cheers.

View solution in original post

sumants
Engager

It has to do with the user permissions. Try assigning "db_connect_user" role to the user (currently executing the query) directly from the Access controls » Users page. At least that is what resolve my problem.
Cheers.

cyndiback
Path Finder

I'm getting this same error - I only need the users to be able to run dbxquery. Did you find a solution?

0 Karma

kissgery
Explorer

Hi cyndiback, the only solution we found (regardless of which permission is needed) to assign the rights over roles in LDAP mapping instead of doing it directly. (If you do not use LDAP for authentication this solution won't help you)

0 Karma

kissgery
Explorer

Thank's for the hint, it was really a permission problem. It was difficult to find the solution because we use LDAP mapping for role assignment and any direct role assignment had no effect. The only way it worked was to change the LDAP mapping.

0 Karma

kissgery
Explorer

Hi ctaf, assign the "db_connect_user" role to the given LDAP Group instead to add it directly. See here

0 Karma

ctaf
Contributor

EDIT: nevermind, I found the solution here: https://answers.splunk.com/answers/406891/db-connect-220-not-working-in-shc.html

Hello Kissgery, how did you manage to solve it? I am having the same issue and adding "db_connect_user" role to my user's custom role doesn't work but adding "db_connect_user" in the user's inherited roles works. This is very strange. Do you remember what you changed in the LDAP mapping?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...