How do I give user changeOwnPassword priviledge

I am trying to create custom role with changeOwnPassword privilege’s but I do not see this privilege’s in any of the built in actions. How do I assign a user with this privileges’? I see documentation that this action is needed for the roles that are applied to user in order to change the user’s password, but how do I assign this action without having it available in the list? Please, advice.

Hi @Todd_Garrison ,

In atlas the database users passwords are not changed with the regular MongoDB server commands but with the Atlas UI/API and therefore this specific server role is not relavent for Atlas projects.

https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Database-Users/operation/updateOneDatabaseUserInOneProject

To use this resource, the requesting API Key must have the Project Atlas Admin or Project Charts Admin roles. This resource doesn’t require the API Key to have an Access List.

If you need to have a more granular way of managing resources please refer to my article:

This approach will allow you to check if the changed user is actually the one who can access this user.

Thanks
Pavel