In the official Power Apps blog post ‘Building an Approval experience in Canvas Apps‘ (published on April 15, 2020) there’s a link to the swagger file for the Approval custom connector that exposes the operations to retrieve sent and received approvals, and to approve or reject an approval request. From the Approvals action center in Power Automate it’s also possible to cancel an approval (as owner) and to reassign approval requests. So I’ve decided to extend the swagger file with these additional operations. The cancel operation is now part of the extended swagger file.

Get the extended swagger file for the Approval custom connector here:

Edit the values for the host and default name for your environment:

"host": "",
            "name": "environment_name",
            "in": "path",
            "required": true,
            "type": "string",
            "default": "72e87f56-e215-43d4-8883-5cf7ff5550f5"

Follow the instruction of the original blog post for the custom connector deployment. Once the custom connector is created based on the swagger file, the Cancel Approval action can be added to your flow.

Here’s just a simple test to show that it works.

The cancel action is added as activity to the approval history in the Approvals action center of Power Automate.

Next step is to add the reassign operation to the extended swagger file. To be continued.

The post Extending the swagger file for the Approval custom connector appeared first on There's Something About Dynamics 365.