Failed to validate m103-application-user

I was successfuly created m103-application-user user but validation script failed with:

vagrant@m103:~ vagrant@m103:~ validate_lab_first_application_user
User ‘m103-application-user’ not configured correctly - make sure your
application’s user has readWrite access to the applicationData database.

Here is the user roles from admin db:

db.MongoDB Enterprise > db.createUser({user: “m103-application-user”,pwd: “m103-application-pass”,roles:[{db:"applicationD db.createUser({user: “m103-application-user”,pwd: “m103-application-pass”,roles:[{db:“applicationData”,role:“read”}]})
Successfully added user: {
“user” : “m103-application-user”,
“roles” : [
{
“db” : “applicationData”,
“role” : “read”
}
]
}
Here is validation via mongo shell:
MongoDB Enterprise > db.getUser(“m103-application-user”)
{
“_id” : “admin.m103-application-user”,
“userId” : UUID(“4ac04bce-15f9-4430-a0e4-8dd9a65d19ec”),
“user” : “m103-application-user”,
“db” : “admin”,
“roles” : [
{
“role” : “read”,
“db” : “applicationData”
}
]
}
Can you help?

Best regards,
Denis

Successfully created but you assigned the wrong role. The error message told you so

Your getUsers() gives

1 Like

Thank you, already solved. you are right.

Closing this thread as the issue has been resolved.