Resetting password using graph api inside power virtual agent

Anonymous123 20 Reputation points
2024-06-27T14:43:16.8966667+00:00

I am trying to create chatbot that will reset user's password using power virtual agent. For the password reset flow I tried to follow these steps: https://powerusers.microsoft.com/t5/General-Power-Automate/Http-request-Azure-AD-Change-password/td-p/894179

and i have given permissions Delegate: UserAuthenticationMethod.ReadWrite.All as stated in documentation. Inside power automate I first have a flow to obtain a bearer token and then a password reset flow. But I keep getting error 403 access denied.

After reading the documentation on authorization errors https://learn.microsoft.com/en-us/graph/resolve-auth-errors the only way to reset user's password is to use delegate permissions as application permissions are no longer supported. But how do I use delegate permissions if I am trying to create a bot that will reset the password on behalf of the user.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,189 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,121 questions
Microsoft Copilot
Microsoft Copilot
Microsoft terminology for a universal copilot interface.
182 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yakun Huang-MSFT 1,645 Reputation points Microsoft Vendor
    2024-06-28T02:27:46.1733333+00:00

    Hi @anonymous123

    Yes, according to the Graph API, resetting the password requires delegation permission.

    User's image

    To use delegate permissions, you need to use Auth code flow, you can refer to this link to get the corresponding token:

    https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    0 comments No comments

0 additional answers

Sort by: Most helpful