Reassign An Approval In Power Automate
Reassign An Approval In Power Automate Posted by - Matthew Devaney on - June 9, 2024 28 Comments You can reassign an approval in Power Automate by using a si...
- Published
- Reading time
- 4 min read
Before you start
Is this guide for you?
- Best entry point
- Power Automate
- Time investment
- 4 min read
Imported reference from Matthew Devaney's blog for learning purposes. Original: https://www.matthewdevaney.com/reassign-an-approval-in-power-automate/. Author: Matthew Devaney.
Reassign An Approval In Power Automate Posted by - Matthew Devaney on - June 9, 2024 28 Comments
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 Flow Choose An Approval To Be Reassigned
Get The Approval ID For The Approval To Be Reassigned
Set The Approval ID And Flow Environment Variables
Make A Connection To Microsoft Teams Approvals
Reassign An Approval In Power Automate Using An HTTP Request
Run 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 Code language: JavaScript ( javascript )
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: Key Value Accept application/json Body of the request: {
"AssignedTo" : "@{variables('varAssignedTo')}" ,
"ApprovalId" : "@{variables('varApprovalId')}" ,
"ApprovalRequestId" : "@{variables('varApprovalRequestId')}" , "Properties" : { "Response" : "" , "Comments" : "" },
"FlowEnvironment" : "@{workflow()?['tags']?['environmentName']}" } Code language: JSON / JSON with Comments ( json )
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. Did You Enjoy This Article? 😺
Subscribe to get new Copilot Studio articles sent to your inbox each week for FREE Enter your email address Sign Me Up 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 Power Automate
Save Docusign Document To SharePoint With Power Automate
Tagged
Approvals · Power Automate
Have a Microsoft 365 topic idea?
Share article suggestions, community session ideas, corrections, or real-world scenarios for future nextM365 learning notes.
Keep learning Microsoft 365
Explore more practical guides for SharePoint, Power Platform, Copilot Studio, migration, automation, governance, and security.
Continue learning
Related tutorials
Related questions
Related comparisons
Next action