Hello Fabio, sorry to resurrect this thread,
which roles the user you used had? At the moment I have:
authenticatedUserRoles: [
{ role: 'clusterAdmin', db: 'admin' },
{ role: 'dbAdminAnyDatabase', db: 'admin' },
{ role: 'dbOwner', db: 'admin' },
{ role: 'hostManager', db: 'admin' },
{ role: 'readWriteAnyDatabase', db: 'admin' },
{ role: 'root', db: 'admin' },
{ role: 'userAdminAnyDatabase', db: 'admin' }
but I still get:
db.getSiblingDB("admin").fsyncUnlock()
MongoServerError[Unauthorized]: not authorized on admin to execute command { fsyncUnlock: 1, lsid: { id: UUID("f914c7ea-de33-4f81-ac62-763d02b979d3") }, $clusterTime: { clusterTime: Timestamp(1746605884, 1), signature: { hash: BinData(0, ADD7CB273715DF53828EC7D8D04CEE1E24F9B3C9), keyId: 7501307811511402521 } }, $db: "admin" }