Reassign An Approval In Power Automate

Reassign An Approval In Power Automate

You can reassign an approval in Power Automate by using a single flow action. This ability is not included in the standard approvals actions. However, we can invoke an HTTP request to call the Microsoft Teams approvals API and reassign the request.

Table of Contents
• Introduction: The Reassign An Approval FlowChoose An Approval To Be ReassignedGet The Approval ID For The Approval To Be ReassignedSet The Approval ID And Flow Environment VariablesMake A Connection To Microsoft Teams ApprovalsReassign An Approval In Power Automate Using An HTTP RequestRun The Reassign An Approval Flow In Power Automate



Introduction: The Reassign An Approval Flow

An employee at an insurance company makes a work from home request using Microsoft Teams and then their manager goes on vacation. We will reassign the approval by creating a Power Automate flow.



Choose An Approval To Be Reassigned

An approval may only be reassign when it is in requested status. Open Microsoft Teams approvals center and find a “requested” approval.



Or create a new approval request if there are no approvals with a requested status. Here’s an example that can be copied if needed.




Get The Approval Id For The Approval To Be Reassigned

To reassign an approval using Power Automate we will need to get the Approval’s unique ID. Go to make.powerautomate.com and navigate the Approvals table (in Dataverse). Search the table for the record with a matching Title. The unique identifier is located in the Approval field of the record.



We will also need the unique identifier for the Approval Request. Go the the Approval Request table and look for a record with an Approval Id Index that matches the Approval unique id. Then make a note of the Approval Request unique identifier for it.




Set The Approval ID And Flow Environment Variables

Now we have the information we need to make a Power Automate flow to cancel the approval. Start a new instant flow and add an initialize variable step. Create a variable named varApprovalId and set the value to the unique identifier of the approval.

Also create a variable named varApprovalRequestId and set the value to the unique identifier of the approval request.

Finally, initialize one last variable named varAssignedTo and load it with the email address of the person who the approval should be reassigned to.




Make A Connection To Microsoft Teams Approvals

An approval cannot be reassigned using the standard Microsoft Teams actions included in Power Automate. We will use the HTTP With Microsoft Entra ID (Pre-authorized) – Invoke An HTTP Request action to cancel an approval instead.

Upon adding the action we will be asked to setup a connection.



Use the following URL in both the Base Resource URL and Microsoft Entra ID Resource URI fields and press the Sign In button.

https://approvals.teams.microsoft.com




Reassign An Approval In Power Automate Using An HTTP Request

Fill-in the flow action with the following values to reassign the approval request.



Method:

POST



Url of the request

/api/reassignApproval



Headers:

KeyValue
Acceptapplication/json



Body of the request:

{
    "AssignedTo": "@{variables('varAssignedTo')}",
    "ApprovalId": "@{variables('varApprovalId')}",
    "ApprovalRequestId": "@{variables('varApprovalRequestId')}",
    "Properties": {
        "Response": "",
        "Comments": ""
    },
    "FlowEnvironment": "@{workflow()?['tags']?['environmentName']}"
}




Run The Reassign An Approval Flow In Power Automate

We’re done. Save the flow and give it a run to reassign the approval.



After the flow is completed we can see the approval has been reassigned in the approval details along with who it was reassigned to and the timestamp.




Questions?

If you have any questions or feedback about Reassign An Approval In Power Automate please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion.

Matthew Devaney

Subscribe
Notify of
guest

7 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Yana
Yana
19 days ago

Which permissions are needed for the account executing the flow?

Tim
Tim
16 days ago
Reply to  Yana

Approvals Administrator (Security Role) assigned from the Power Platform Admin Center should cover it 🙂

Last edited 16 days ago by Tim
Tim
Tim
16 days ago
Reply to  Yana

Sorry, ignore my last comment! At this point I believe you need to be the owner of the Approval Request (The person who has had the Approval requested of them) in order for this method to work. There are more complex ways to Reassign on behalf of another use but unlike those this method acts as a proper reassign and sends the notification which is neat!

Last edited 16 days ago by Tim
Steve Farrall
Steve Farrall
17 days ago

Hi Matthew,

Thank you for sharing this. I’ve tried to get it working, but I’m getting an error and wondered if you have encountered this one?

{“$”:[“The JSON value could not be converted to Approvals.Common.Models.ReassignApproval.ReassignApprovalControllerInput. Path: $ | LineNumber: 1 | BytePositionInLine: 16.”]}}

Regards,
Steve

Flow error.png
Steve Farrall
Steve Farrall
12 days ago

I figured it out thank you – I was missing the opening curly brace.

Now I’m getting a 403 forbidden, which I think relates to the other comments on this post.

Steve Farrall
Steve Farrall
12 days ago
Reply to  Steve Farrall

FYI I figured this out – you need to update the Approval and Approval Request to allow reassignment. I did that in my flow before sending the HTTP request and it works.