Dynamics 365 – See Cloud Flow Run History in Dataverse

Managing cloud flows is essential for smooth automation in Dynamics 365. Now that cloud flow run history is stored in Dataverse, admins and developers can see automation processes clearly. Let’s look at how to use this feature for monitoring and troubleshooting.

Why Store Cloud Flow Run History in Dataverse?

Power Automate runs many automated workflows in an organization, and tracking these executions at scale can be challenging. With this new feature:

  • Centralized Monitoring: Cloud flow run history is stored in the FlowRun table within Dataverse, allowing better tracking.
  • Security & Access Control: Role-Based Access Control (RBAC) ensures only authorized users can view flow run data.
  • Optimized Performance: Run history data is stored in dedicated partitions per user for efficient storage management.
  • Retention Control: Admins can adjust how long flow run data is kept to optimize storage usage.

How to View Cloud Flow Run History in Dataverse

There are multiple ways to access and analyze the cloud flow run history:

1. Using Dataverse API or Connector

You can retrieve flow run history using Dataverse’s Web API or the Dataverse connector in Power Automate.

GET {{DataverseURL}}/api/data/v9.1/flowruns

This API call fetches the flow run records stored in Dataverse.

<fetch>
  <entity name="flowrun">
    <attribute name="conversationid" />
    <attribute name="createdby" />
    <attribute name="createdon" />
    <attribute name="createdonbehalfby" />
    <attribute name="duration" />
    <attribute name="endtime" />
    <attribute name="errorcode" />
    <attribute name="errormessage" />
    <attribute name="flowrunid" />
    <attribute name="importsequencenumber" />
    <attribute name="isprimary" />
    <attribute name="modernflowtype" />
    <attribute name="modifiedby" />
    <attribute name="modifiedon" />
    <attribute name="modifiedonbehalfby" />
    <attribute name="name" />
    <attribute name="overriddencreatedon" />
    <attribute name="ownerid" />
    <attribute name="owningbusinessunit" />
    <attribute name="parentrunid" />
    <attribute name="partitionid" />
    <attribute name="resourceid" />
    <attribute name="starttime" />
    <attribute name="status" />
    <attribute name="timezoneruleversionnumber" />
    <attribute name="triggertype" />
    <attribute name="ttlinseconds" />
    <attribute name="workflow" />
    <attribute name="workflowid" />
    <filter>
      <condition attribute="cm_strategy" operator="not-null" value="" />
    </filter>
  </entity>
</fetch>

2. Dataverse Tables View in Maker Portal

You can navigate to the FlowRun table in the Maker Portal to see detailed execution logs of cloud flows.

Steps:

  • Open Power Apps Maker Portal.
  • Go to Tables.
  • Search for FlowRun.
  • Open the table to view execution details.

Managing Cloud Flow Run History Storage

By default, flow run data is stored for 28 days. You can modify this retention period based on your storage needs.

1. Changing Time to Live (TTL) via Dataverse API

If you want to extend or reduce storage duration, update the FlowRunTimeToLiveInSeconds value in the Organization table.

PATCH {{DataverseURL}}/api/data/v9.1/organizations(OrgID)
Content-Type: application/json
{
   "FlowRunTimeToLiveInSeconds": 1209600 // 14 days
}

2. Setting TTL in Power Platform Admin Center

Admins can configure the retention period in Power Platform Admin Center:

  • Navigate to Environments.
  • Select your environment and go to Settings.
  • Under Product > Features, find Cloud flow run history.
  • Set retention time to 28 days, 14 days, 7 days, or disable it.

3. Deleting FlowRun Records to Free Up Space

If storage is running low, reduce stored records by setting TTLInSeconds for a set of FlowRun records.

PATCH {{DataverseURL}}/api/data/v9.1/flowruns(FlowRunID)
Content-Type: application/json
{
   "TTLInSeconds": 0
}

This removes unwanted records within minutes, but deleted records cannot be recovered.


Handling Incomplete FlowRun Data

Sometimes, flow run data may be incomplete due to ingestion issues. To identify missing records, check the FlowEvent table.

GET {{DataverseURL}}/api/data/v9.1/flowevents?$filter=EventType eq 'FlowRunIngestion'

This query helps detect skipped flow runs and diagnose data inconsistencies.


Final Thoughts

Storing cloud flow run history in Dataverse is a big improvement for keeping track of Power Automate flows in Dynamics 365. With Dataverse’s security, efficient storage, and flexibility, organizations can have better control over their automation data.

You can easily view execution history, change how long data is kept, or remove old records. Dataverse gives you the tools to manage cloud flow runs effectively.

Leave a comment