mongosh db.runCommand along with db.createUser bug

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Community Answered
    • Priority: Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • Environment:
      windows 11

      Using MongoDB: 7.0.12
      Using Mongosh: 2.3.0

    • Not Needed
    • Developer Tools

      The following command gets executed successfully and account gets created, however a shell error is thrown:

       

      Enterprise admin> db.runCommand(db.createUser( {user: "test111_3",pwd: "emad123",roles: [

      { role: "readWrite", db: "admin" }

      ]}) )
      MongoServerError[CommandNotFound]: no such command: 'ok'

       

      image is attached for reference.

       

      Regards,

      Emad Al-Mousa

       

       

       

            Assignee:
            Unassigned
            Reporter:
            emad mousa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: