web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Cancel any Power Autom...
Power Automate
Unanswered

Cancel any Power Automate flow run via REST API using Run ID, Flow ID, and Environment

(1) ShareShare
ReportReport
Posted on by 2
Hi community,

We're trying to programmatically cancel running Power Automate flows from an external system (Python backend) using just:

  • runId
  • flowId
  • environmentId

This includes flows triggered by SharePoint (like “When an item is created/modified”), not just manually triggered ones.

What we’ve tried

Using the public REST API:

POST https://api.flow.microsoft.com/providers/Microsoft.ProcessSimple/environments/{envId}/flows/{flowId}/triggers/manual/histories/{runId}/cancel?api-version=2016-11-01

But it fails with:

"No HTTP resource was found that matches the request URI..."

What we understand this only works for flows with manual triggers (e.g., “When an HTTP request is received”). However...The “Cancel Flow Run” action available in the Power Automate Management Connector (inside Power Automate flows) does cancel SharePoint-triggered flows — using the same identifiers (runId, flowId, envId). This confirms the functionality does exist internally.

What we want

We're looking for a way to cancel any running flow — regardless of its trigger — using a public REST API, and without needing premium features like Dataverse or solution-aware flows.

Questions:

  • Is there a documented REST API or supported method to cancel non-manual flows (e.g., SharePoint-triggered) from outside Power Automate using runId, flowId, and environmentId?
  • If not currently possible — is this feature on the roadmap?
  • Is the “Cancel Flow Run” logic in the Management connector backed by an internal API that might eventually be made public?
  • Any workaround that works without Dataverse or premium licensing?

Thanks in advance — any clarity or official response would be greatly appreciated!

— Bharadwaj Jannu

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at
    I'm not sure this is the workaround you are looking for, but one possibility would be to create a Power App front end to invoke a manual flow. Pass the three parameters from the Power App to the Flow and then use the management action to Cancel the Flow run.  That should work and would be Standard licensing. But it doesn't tie in to Python as you suggested.
     
    I don't have any internal knowledge to answer your other questions.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard