Hi @Parag Patwardhan
If you are trying to update a user's password credentials, then you must follow that prerequisite.
Additionally, updating a user’s password is a sensitive action. If you are trying to update an administrator’s password, then the logged-in user/service principal should have a higher role than the target user.
Please refer to who can perform sensitive actions: https://learn.microsoft.com/en-us/graph/api/resources/users?view=graph-rest-1.0#who-can-reset-passwords.
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.