Docs Menu

Docs HomeMongoDB Manual

Role Management Methods


For details on a specific method, including syntax and examples, click on the link to the method's reference page.

Creates a role and specifies its privileges.
Deletes a user-defined role.
Deletes all user-defined roles associated with a database.
Returns information for the specified role.
Returns information for all the user-defined roles in a database.
Assigns privileges to a user-defined role.
Removes the specified privileges from a user-defined role.
Specifies roles from which a user-defined role inherits privileges.
Removes inherited roles from a role.
Updates a user-defined role.
←  passwordPrompt()db.createRole() →
Share Feedback
© 2023 MongoDB, Inc.


  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.