Showing results for 
Search instead for 
Did you mean: 

alteryx server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Authentication Database Mechanism in MongoDB

Alteryx Partner

I am using authentication database mechanism in MongoDB. In the Mongo DB Input tool of Alteryx  I see no option where I can specify the authentication database. Does Alteryx support authentication database mechanism while accessing the MongoDB database?


Hi @donna_mitra,


The MongoDB tool connects to a server, not to a specific DB. The User should be authenticated to the Database that they are created on, however they may have roles set up on other DB's on the same server. When you enter the User/Pass in the MongoDB tool, the server should authenticate the user, rather than an individual DB.


Let me know if I've misunderstood the question.




Hi @KaneG


I am getting an authentication failed error any time I attempt to read from or write to any database that is not the database I authenticate to.  I triple checked my roles, and so far the only way I have been able to resolve this error is to create a new identical user in each database.  Please let me know your thoughts.  Thank you in advance!




Hi @EYamada,


I'm possibly not the best person for this, a year ago I found myself doing a fair bit with Mongo and so the answers were fresh. 


From your question, I'm guessing that you are not talking about the Alteryx Server MongoDB, but rather another Mongo Server. I think that you should be able to set roles on the other DB's on the Server, however the User should only need to authenticate to one DB per server. There is some funny things that can happen by memory if the user is not on an admin DB...


Try having a look at the results of db.getroles() to see the access for the user.




I'm having the same issue. The response marked as a "solution" is not a solution, and I'm wondering if one exists. If you use an authentication database in Mongo, you have to specify the database to use to authenticate (typically the "admin" database), and data is in some other database. The connector seems to assume that the database you connect to is also the authentication database. So as another user noted, the only work around seems to be to add authentication data to every database you want to connect to. The connector should prompt for two databases: the authentication database and the "data" database. For reference, take a look at Mongo's own connection GUI within Compass. The database/collection for the actual data is specified elsewhere.




Same problem here.

I want to connect to and external MongoDB server and my user is only set on admin database, but the data that I want to use is not on admin database.

As mscannel said, I'll have to add my user to all databases that I want to connect with the Alteryx Designer, even though I'm an admin on MongoDB and already have access to everything.


This problem would be solved if this toll had a "Authentication" database and a "data load" database / collection.