Ailton
Ailton

Reputation: 117

Error 8000 (AtlasError): '(Unauthorized) not authorized on admin to execute command

I connected to my Cluster (MongoDB Atlas) using Studio 3T. But when i click on the users button, i receive the error of the photo. I have the user ailtonjr with atlasAdmin@admin role in the Database Access and my IP in Network Access. I can delete and create databases normally on the Atlas via browser, but can't on Studio 3T. Error 8000

Upvotes: 3

Views: 2204

Answers (1)

Tom Slabbaert
Tom Slabbaert

Reputation: 22316

atlasAdmin is a custom role which does not include many "admin" privileges as you'd expect. MongoDB's team choose to leave this ambiguous on purpose so it's unclear exactly what this role contains.

The reason you can do all those actions via their GUI is because you are connected under a different role there, it's not a direct db connection. They do not allow full access for manually created users, I suspect as it can cause synchronization issues.

What you can do is give your user the dbAdmin privilege through their GUI, this will allow you to create and drop databases.

Upvotes: 1

Related Questions