cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Action: Remove Flow Approval - the request api version does not support environments?

Hey there

 

I'd like to use the action "Remove Flow Approval". As I understand it would cancel open Approvals pending by a specific user. I'm not sure if this is due to the fact that this action is pretty new, but I always receive an error:

{
  "error": {
    "code": "ApiVersionDoesNotSupportEnvironments",
    "message": "The request api version does not support environments."
  }
}

The action looks like below:

2019-08-08 17_02_11-Edit your flow _ Microsoft Flow.png

 

Is anyone else facing this issue or am I doing something wrong? 🙂

 

Cheers

 

 

Please click Accept as Solution if my post answered your question. Like my answer? Consider giving it a Thumbs Up. Others seeking the same answers will be happy you did.
12 REPLIES 12
Community Support
Community Support

Hi @FabianAckeret,

 

Have you run this feature successfully before? What value do you put in the variable?

Your error message is the request API does not support environments, so you may hard to access your target.

 

Do you want to cancel the approval of the assigned user who has not responded after a during of time, like 1 day?

Maybe you can set the Time out in the Approval action setting:

Annotation 2019-08-09 145824.png

 

Annotation 2019-08-09 145839.png

Best Regards,

Community Support Team _ Lin Tu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hey @v-litu-msft , thanks for your reply.

 

No, I never used this action before.

The variable contains a UPN.

 

I'd like to cancel the approval as soon as a variable is set to true. Unfortunately, I can't work with time (e.g. 1 day) here.

 

Kind regards,

Please click Accept as Solution if my post answered your question. Like my answer? Consider giving it a Thumbs Up. Others seeking the same answers will be happy you did.

Hi @FabianAckeret,

 

If you want to cancel approval manually, you can cancel it at the approval center, just like this:

Annotation 2019-08-09 152729.png

Best Regards,

Community Support Team _ Lin Tu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-litu-msft 

 

I don't want to cancel each approval manually, that's not an option.

It needs to be automated which is why I wanted to use the action "Remove Flow Approval".

 

Do you have the same issue on your tenant or does it work?

Please click Accept as Solution if my post answered your question. Like my answer? Consider giving it a Thumbs Up. Others seeking the same answers will be happy you did.
Super User
Super User

I was just wondering whether what I've typed into the environment field was correct or if it is requesting some other value. Can anyone confirm that?

Please click Accept as Solution if my post answered your question. Like my answer? Consider giving it a Thumbs Up. Others seeking the same answers will be happy you did.

Hi @FabianAckeret,

 

Sorry for the reply delay, you can take the environment name from Admin center, then get the value from the site ( Redline marked ).Annotation 2019-08-15 170940.png

Please have a try, I hope it can help you.

Best Regards,

Community Support Team _ Lin Tu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for your reply.

Unfortunately, it didn't help. It's actually the same name I used in my first post.

Please click Accept as Solution if my post answered your question. Like my answer? Consider giving it a Thumbs Up. Others seeking the same answers will be happy you did.
Helper I
Helper I

Hi @FabianAckeret 

 

did you ever get this to work? I am facing the same issue and the documentation at docs.microsoft.com is not very helpful.

 

Environment Name
environmentTruestring

Name field of the Environment.

Field userId
userIdTruestring

Flow user principal object ID.

 

@v-litu-msft can you give an example of parameters for this action?

 

Regards

Lukas

Hi @lkaspar 

 

I opened a ticket with Microsoft. They stated that this is an issue with their connector leading to a complete workover of the connector. Initially, the wanted to publish it worldwide by the end of September but ran into some issues. Now they don't have a date anymore 😞

I guess we'll just have to wait quite a while for this now 

Please click Accept as Solution if my post answered your question. Like my answer? Consider giving it a Thumbs Up. Others seeking the same answers will be happy you did.
Frequent Visitor

Has it worked on anyone?

 

I get exactly the same error message and have already opened a ticket at Microsoft. But the support could not help me and said that the connector is still in the test phase.

Hey @Blaub  and @FabianAckeret 

 

While I haven't managed to get the Remove Flow Approval action to work, there is a workaround to cancel modern approvals.

 

Let's assume you have your first flow that creates the approval:

 

image.png

 

Once the approval is created, you will get the Approval ID:

image.png

 

 

Create a second flow that is responsible for cancelling the approval. Find the Common Data Service - Update a record action and populate the following fields:

 

Make sure to fill in the following fields:

EnvironmentCurrent
Entity NameApprovals
Record IdentifierApproval ID (this is the ID from the first flow)
Stage ValueComplete
Status Reason ValueReason of cancel (pick from the dropdown, including Canceled, Expired, Abandoned, etc.)
Completed OnTime of completion (use the expression utcNow() to get the current time)
ResultThe value that appears in the Outcome field
Status ValueInactive

 

image.png

 

Run the flow and head over to the history tab on the Flow Approval Center to see the cancelled approval:

image.png

 

Feel free to message me if you have any questions.

 

Advocate II
Advocate II

Any updates from Microsoft?  This is really needed to keep a users list of Approvals in Power Automate to only active Approvals.  I just tried the connector and received the same error message.  

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (12,791)