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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Export All cloud flows...
Power Automate
Suggested Answer

Export All cloud flows in my organization with last execution time

(1) ShareShare
ReportReport
Posted on by 2
I have to check the last execution time of all the cloud flows in my organization. Currently, I can use "Get-Adminflow" command in PowerShell to export all flows in my org. However, the output of this command only show columns like FlowName, CreateTime, CreateBy that can't meet my requirement. Due to this issue, I use another PowerShell command, Get-FlowRun, to retrieve the last execution record of every flow in my org. However, after I use this command, I can only see the last execution time and status of the flows that I owe and others share with me, other flows of these two columns remain empty.
Besides, I have the Power Platform administrator authority and Power Automate Premium for my account
Is there any suggestion that how can I fix this issue? Thanks a lot.
 
My PowerShell command:
Import-Module Microsoft.PowerApps.Administration.PowerShell
Connect-AzureAD
Add-PowerAppsAccount
$flows = Get-AdminFlow
$detailedFlows = @()
foreach ($flow in $flows) {
    $ADUser = $null
    try {
        $ADUser = (Get-AzureADUser -ObjectId $flow.CreatedBy.userId)
    }
    catch {
        Write-Warning "User not found for ObjectId: $($flow.CreatedBy.userId)"
    }
    if ($ADUser) {
        $lastRun = (Get-FlowRun -EnvironmentName $flow.EnvironmentName -FlowName $flow.FlowName | Sort-Object -Property StartTime -Descending | Select-Object -First 1)
        $detailedFlows += [PSCustomObject]@{
            flowName = $flow.DisplayName
            creatorID = $ADUser.UserPrincipalName.Substring(0, 6)
            creatorName = $ADUser.DisplayName
            creatorDept = $ADUser.Department
            modifiedTime = $flow.LastModifiedTime
            lastExecutionTime = $lastRun.StartTime
            status = $lastRun.Status
            enable = $flow.Enabled
        }
    }  
}
$detailedFlows | Export-Csv -Path "../flow_detail.csv" -Encoding UTF8
Categories:
I have the same question (1)
  • Suggested answer
    ankit_singhal Profile Picture
    618 Moderator on at
    You should use any service account for this activity. Service account should be owner of all flow or you can share all flow with you as well if there is no impact.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 103 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 87

#3
trice602 Profile Picture

trice602 63 Super User 2026 Season 1

Last 30 days Overall leaderboard