azure-active-directorymicrosoft-graph-api

How to find the delay when I reset a password using Microsoft's Graph API?


I am using the Microsoft Graph API to reset a user's password, but there is a delay when I try the new password, between 1-2 minutes before the new password works. I am using the following endpoint:

PATCH https://graph.microsoft.com/v1.0/users/{{userId}}

{
    "passwordProfile" : {
       "password": "111111",
       "forceChangePasswordNextSignIn": false
    }
}

Is there a way to tell when the new password is ready to use or another more efficient endpoint?


Solution

  • graph takes up to 5 minutes in updating/showing the value. What I have used in the past to resolve this is Redis Cache. When saving the new data (password in your case), save it also in redis for 5 minutes, then when checking, go first to redis, if the value is not there, go to graph.