cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Responsive Resident
Responsive Resident

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

 

 

12 REPLIES 12
Highlighted
Community Support
Community Support

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

Hi @isabasu,

 

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.

Highlighted
Responsive Resident
Responsive Resident

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

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,

Highlighted
Community Support
Community Support

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

Hi @isabasu,

 

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.

Highlighted
Responsive Resident
Responsive Resident

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

@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?

Highlighted
Responsive Resident
Responsive Resident

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

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?

Highlighted
Community Support
Community Support

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

Hi @isabasu,

 

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.

Highlighted
Responsive Resident
Responsive Resident

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

Thanks for your reply.

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

Highlighted
Helper I
Helper I

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

Hi @isabasu 

 

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

Highlighted
Responsive Resident
Responsive Resident

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

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 

Highlighted
Frequent Visitor

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

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.

Highlighted
Helper I
Helper I

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

Hey @Blaub  and @isabasu 

 

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.

 

Highlighted
Advocate II
Advocate II

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

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
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Users online (7,526)