Getting Error while connecting to MongoDB using Node.js in VS code

I am getting this error, please help me
Mongo DB

user is not allowed to do action [find] on [node-tuts.blogs]

Looks like this is an Atlas cluster. The above error message indicates the database user isn’t allowed to perform a find command on the namespace mentioned above. Double check the specific user being used when the error was being generated in the Database Users section of the Atlas UI and ensure they have the correct privlidges to perform the find operation on the node-tuts.blogs namespace.


Check if this works
In the Atlas cluster, select Security , go to Database Access click on Edit under database user privileges select Built-in role and under the dropdown select Read and write to any database to the user. Try again or refresh your connection to see the result.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.