You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过Graph Api获取所有用户重置密码所需的认证方法数量

获取用户密码重置认证方法的Graph API方案
  • 使用用户认证方法列表接口获取目标数据,接口路径:
    GET /users/{id | userPrincipalName}/authentication/methods
    该接口返回用户已注册的所有认证方法,其中包含密码重置可用的类型(如短信、邮件、Microsoft Authenticator应用等)。
  • 若需精准筛选仅密码重置相关的方法,可添加$filter参数:
    GET /users/{id | userPrincipalName}/authentication/methods?$filter=methodCategory eq 'passwordReset'
  • 权限要求:需配置UserAuthenticationMethod.Read(单用户读取)或UserAuthenticationMethod.Read.All(批量用户读取)权限,可通过Azure AD门户为应用/委派身份授予对应权限并完成同意流程。
  • 示例请求(可在Graph Explorer中直接测试):
GET https://graph.microsoft.com/v1.0/users/your-user-principal-name@domain.com/authentication/methods?$filter=methodCategory eq 'passwordReset'

返回结果会直接对应你截图中「password reset -> Authentication methods」下的已配置方法列表。

内容的提问来源于stack exchange,提问作者Igor

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.19 06:00:16