Do we have any microsoft graph api to change the password of the user giving his existing password?

Laxmi Prasanna 96 Reputation points
2020-02-24T07:32:28.763+00:00

We are using microsoft graph api and we are able to reset password by updating password profile. Similarly is there any other api to change the password of a user. We are having urgency on this, faster solution is appreciated.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,633 questions
0 comments No comments
{count} vote

Accepted answer
  1. AmanpreetSingh-MSFT 56,506 Reputation points
    2020-02-26T07:51:01.847+00:00

    @Laxmi Prasanna If you want to change password of User1, you need to use password flow to get a token using User1's credentials. You cannot use that token to change password of User2 even if User1 is Global Administrator. If you want to change password of User2, you need to obtain a token using User2's credentials. You cannot use Client_Credential flow for this purpose as well.

    Hope this helps clarifying your doubt.

    -----------------------------------------------------------------------------------------------------------

    Please "Accept as answer" wherever the information provided helps you to help others in the community.

    4 people found this answer helpful.

4 additional answers

Sort by: Most helpful
  1. AmanpreetSingh-MSFT 56,506 Reputation points
    2020-02-24T09:47:32.17+00:00

    @Laxmi Prasanna Below is the call that you need to use for this purpose:

    Note: This can only be done in current users context to change his/her own account's password, which is why I have used /me endpoint in the above POST call. You cannot use Global Administrator account or an Application to obtain a token and use that token in Authorization header to change password of any other user account.

    -----------------------------------------------------------------------------------------------------------

    Please "Accept as answer" wherever the information provided helps you to help others in the community.

    2 people found this answer helpful.

  2. Desarrollo Ospedale 6 Reputation points
    2020-08-27T00:22:35.107+00:00

    Hi all!

    I would like your help to resolve why the error appears in the attached image.

    I made the entry with my own business account and I want to reestablish the password but I do not get permission denied error.

    error": {
    "code": "Authorization_RequestDenied",
    "message": "Access to change password operation is denied.",
    "innerError": {
    "date": "2020-08-27T00: 19: 47",
    "request-id": "ece8a4af-9339-4b73-8d62-e230bee3e797"
    }

    20570-error-apigraph.png

    1 person found this answer helpful.

  3. Pankaj Verma 1 Reputation point
    2020-04-06T10:37:05.487+00:00

    Hi @AmanpreetSingh-MSFT :

    I get the below response when i try to change my password. I understood that i need to provide the bearer token, but not sure how to get that. Any pointers ?

    {  
      "error": {  
        "code": "InvalidAuthenticationToken",  
        "message": "Access token is empty.",  
        "innerError": {  
          "request-id": "369c1fd2-3f5e-4616-819e-ef0828bbfa10",  
          "date": "2020-04-06T10:28:28"  
        }  
      }  
    }  
    

  4. Gurpreet Arora 1 Reputation point
    2021-06-21T15:32:04.003+00:00

    Hi @AmanpreetSingh-MSFT ,

    Can we manage Reset Password Using graph API? Because I found in Microsoft Documentation that it is under Beta Version.

    107685-image.png

    https://learn.microsoft.com/en-us/graph/api/passwordauthenticationmethod-resetpassword?view=graph-rest-beta&tabs=csharp