如何重置Azure Active Directory的密码? [英] How can reset password of Azure Active Directory?

查看:147
本文介绍了如何重置Azure Active Directory的密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已在应用程序中使用 AAD 进行身份验证。我想通过 REST api 重设用户密码。我的用户ID如 ABCD@onmicrosoft.com 。 AAD是否有通过传递id来更新密码的任何默认方法,否则任何演示示例都将非常有帮助。

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.

推荐答案

您可以重置使用图形API 的用户密码,您想查看C#中的 PasswordProfile 类。

You can reset a users password using the Graph API, you want to be looking at the PasswordProfile class in C#.

直接API调用就是这样,不是请求不是POST或GET的补丁:

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正文:

{
  "passwordProfile": {
    "password": "MyPa$$w0rd",
    "forceChangePasswordNextLogin": false
  }
}

这篇关于如何重置Azure Active Directory的密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆