I can connect to monogo with username and password but when i try to run the command db.getUsers() I get the below error
MongoServerError[Unauthorized]: not authorized on test to execute command { usersInfo: 1, lsid: { id: UUID(“b017691c-9b78-411b-918f-f134c82000ed”) }, $db: “test” }
I am trying to create a user with read and write role access to keep in my dotnet project to insert and read data in mongo as the issue is suddenly I started getting the below error
MongoDB.Driver.MongoAuthenticationException: Unable to authenticate using sasl protocol mechanism SCRAM-SHA-1.
—> MongoDB.Driver.MongoCommandException: Command saslStart failed: Authentication failed.
I have created two databases and only one user everything was working fine I was able to to post or fetch something in Mongo but randomly one database started throwing authentication error but it works perfectly with the other database and same connection string