Depending on your context, I recommend you to use the auth code flow to authenticate the user and get the access token.
First grant your application the UserAuthenticationMethod.ReadWrite.All delegated permission and grant admin consent.
Then run the authentication URL in your browser and log in with your administrator (the admin needs one of the following Azure AD roles: Global administrator, Privileged authentication administrator or Authentication administrator) in the login page that pops up. After that you will get the authorization code in the browser address bar.
https://login.microsoftonline.com/{tenant id}/oauth2/v2.0/authorize?
client_id={client id}
&response_type=code
&redirect_uri={redirect_uri}
&response_mode=query
&scope=UserAuthenticationMethod.ReadWrite.All
&state=12345
Next redeem an access token with your authorization code in postman.
Finally use the access token to call the graph api to reset the user password.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.