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

  1. Referencing a user that was never created
  2. Looking up a user in the wrong authentication database
  3. User was dropped and the application still references it
  4. Case-sensitive mismatch in the username

Diagnostic Steps

Related Issues