Introduction
Power Automate, formally known as Flow, is a powerful automation tool in theOffice 365 family.
It can be used in all major industries to automate their tasks and hence it is being used extensively due to which there could be a need to extract all the Power Automate created by all the users in the tenant for proper audit purposes.
In this blog we will check how we can list all the Power Automate present in the tenant.
Step 1
Install Power Apps Administration PowerShell module using the below command. This PowerShell module contains all the required commands for Power Automate and Power Apps-related admin commands.
- Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
Step 2
It would be useful if we extract the list of all the Power Automate into Excel, which we will do using Export-Csv, which is part of Microsoft.PowerShell.Utility Module and is already available with PowerShell.
To achieve the above objective we can use the below command
- $allTenantFlow = Get-AdminFlow
Note
This command will open a window (as displayed in the image below) to login to tenant where we should use tenant admin credentials to fetch all the Power Automate in the environment.
To export all the Power Automate use the below command.
Note
Please change the path and file name as required
- $allTenantFlow | select DisplayName,FlowName,CreatedTime,LastModifiedTime,EnvironmentName | Export-Csv -path C:\temp\allTenantFlow.csv
Output
The below image displays the excel sheet generated with all the Power Automate.
Conclusion
To export Power Automate for the tenant which could have been created by any user in the tenant, it can be exported to Excel and can then be analyzed as per the company's requirement using Microsoft.PowerApps.Administration.PowerShell Module which is very useful for all Power Apps and Power Automate related admin tasks.