Hi @Stephen_Fitzgerald and welcome to the community!
To get a properly formatted post, I recommend you read the following guide:
Formatting code and log snippets in posts - About the Community / Getting Started - MongoDB Developer Community Forums
Before talking about the problem you are experiencing, I strongly recommend that you take courses at mongodb university, because they will help you better understand how to use mongodb:
MongoDB Courses and Trainings | MongoDB University
Now to your problem, at the end of the documentation page there are examples that can help you create a user, you can’t just copy and paste generic user creation syntax. The reference to the examples in the documentation follows:
db.createUser() - MongoDB Manual v8.0
I hope everything will be useful to you.
Regards
2 Likes