问题
I have used AAD for authentication in my application . I want to reset the password of user through REST api . I have user id like ABCD@onmicrosoft.com. Do AAD have any default method to update password by passing id or any demo example will be much helpful.
回答1:
You can reset a users password using the Graph API, you want to be looking at the PasswordProfile
class in C#.
The direct API call would be something like this, not the request is a PATCH not POST or GET:
https://graph.windows.net/myorganization/users/{user_id}?api-version=1.6
JSON Body:
{
"passwordProfile": {
"password": "MyPa$$w0rd",
"forceChangePasswordNextLogin": false
}
}
来源:https://stackoverflow.com/questions/36595007/how-can-reset-password-of-azure-active-directory