How can reset password of Azure Active Directory?

半腔热情 提交于 2019-12-13 08:27:01

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!