11 — UserNotFound
authenticationauthorisation
The specified user was not found in the database
What is happening?
UserNotFound is returned when an operation references a MongoDB user that does not exist in the specified authentication database. This commonly occurs when managing users with createUser, grantRolesToUser, or similar commands.
Common causes
- Referencing a user that was never created
- Looking up a user in the wrong authentication database
- User was dropped and the application still references it
- Case-sensitive mismatch in the username