Skip Ribbon Commands
Skip to main content

Quick Launch

Todd Klindt's home page > Todd Klindt's Office 365 Admin Blog > Posts > How to use PowerShell to Find all the Flows in Your Tenant
July 15
How to use PowerShell to Find all the Flows in Your Tenant

I have a OneNote file that is full of blog posts that seemed like a great idea at the time, but never saw the light of day for various reasons. Maybe I couldn’t research it as much as I wanted, maybe I couldn’t make it as thorough as I wanted, maybe I just got distracted by something shiny. This blog post is one of them. I was never confident enough to post this one, but given all the Workflow excitement, and a couple of customer requests I decided to dig in and get serious about it. So here it is, two years after I first took the notes for it.

As an administrator, I find myself frustrated a lot by the lack, or at least lack of understanding on how to manage Flows and Power Apps. They never quite behave exactly like I want them to. One of the things that keeps coming up is being able to get a list of all of the Flows in a Tenant. This could be for licensing questions, migrating questions, or just plain curiosity. Whatever it is, it’s never as easy as I want it to be. Being the fanboy of PowerShell that I am, that’s where I looked. Without boring you with a lot of story part, I’ll show you the PowerShell I settled on.

Get-AdminFlow | ForEach-Object { $user = Get-UsersOrGroupsFromGraph -ObjectId $_.CreatedBy.userId;[PSCustomObject]@{ FlowName = $_.DisplayName; OwnerName = $user.DisplayName ; OwnerEmail = $user.UserPrincipalName ; }; }

Let’s break that down a bit. You’ll need to install the PowerApps and Flow for Admins module. Install the PowerApps and Flow for Makers module while you’re at it. If you don’t run Add-PowerAppsAccount and add your Tenant Admin account you’ll get prompted for authentication the first time you run Get-AdminFlow.

Get-AdminFlow lists all of the Flows in a tenant, but not in the most user friendly way:

image

So I cleaned it up a bit. Using ForEach-Object I walk through each Flow. I use Get-UsersOrGroupsFromGraph to get the Owner object. Then I create a PSCustomObject and populate it with the Flow’s DisplayName and the user’s DisplayName and UserPrincipalName properties. It looks like this:

image

Making it an object is a little extra work as opposed to just spewing it onto the screen with Write-Host. But it’s worth the extra effort because I can send it down the pipeline and do more with it. For instance, I can easily pipe it out to a CSV file by appending | Export-Csv -Path .\Flows.csv –NoTypeInformation to the end.

image

That seems a bit anticlimactic at first, but open up that CSV file and prepare to be amazed.

image

If you want different information about each Flow, run Get-AdminFlow | Get-Member and see what other properties are exposed to you.

Let me know if this helps and what else you’d like help with.

tk

ShortURL: https://www.toddklindt.com/POSHFindAllFlows

Edit 7/15/2020 – Changed the PowerShell to be more efficient, but now it doesn’t match the screenshots.

Comments

Link to PowerShell Script

This is a bundle of awesomeness Todd!!  Do you have a link to your updated PS script?
 on 7/16/2020 7:01 PM

Re: Link to PowerShell Script

The PowerShell is in the blog post. I updated it there. I'm thinking about writing it as a function in a module, but I haven't published that yet.

tk
Todd O. KlindtNo presence information on 7/19/2020 9:01 PM

Get-AdminFlow not returning expected value

Thanks Todd for the helpful article. When I am tying Get-AdminFlow, instead of the  flows, I am getting a bunch of {}{}{} followed by a lots  of empty lines scrolled. Account I am using is a Global Admin.

Soumya
 on 9/21/2020 11:14 AM

Find flow in a Sharepoint online site

I have certain kind of sites and don't want to allow users to create flow in those site, we just want to get alert if they create any flow in these site, how can I find if there is any flow created in any site collection.
 on 1/24/2022 10:04 AM

Vileparle Escort Service

My well-developed figure makes you feel sexy at the first touch, and you can feel the fire of my femininity. Would you be interested in gossiping about your relationship with Escort Service InVileparle? If you wish to indulge in your dirty dreams, I won't mine.  Our <a href="https://www.escortservicemumbai.net/vileparle-escorts/">Vileparle Escort Service</a> is prepared for a full night of satisfying sex.
 on 9/29/2023 1:27 PM

Vileparle Escort Service

My well-developed figure makes you feel sexy at the first touch, and you can feel the fire of my femininity. Would you be interested in gossiping about your relationship with Escort Service InVileparle? If you wish to indulge in your dirty dreams, I won't mine.  Our Vileparle Escort Service is prepared for a full night of satisfying sex.
https://www.escortservicemumbai.net/vileparle-escorts/
 on 9/29/2023 1:28 PM

Vileparle Escort Service

Ritu Sharma is a wonderful blend of intellect and beauty. Vileparle is home to some very hot models. I have quite distinct demands from other people. Most girls just prefer money, but Vileparle Escorts like having money and sex simultaneously. I adore those who put me at ease. So, contact my Vileparle Escort Service.
https://www.escortservicemumbai.net/vile-parle-escorts/
 on 10/2/2023 6:24 AM

Re: How to use PowerShell to Find all the Flows in Your Tenant

It's great that you've shared this PowerShell script for managing Flows in Microsoft Power Platform. This script can indeed be helpful for administrators who need to get a list of all Flows in their tenant https://cookieclicker2.org
 on 10/8/2023 10:41 PM

Mumbai Escort Service

 on 10/29/2023 11:56 PM

PayPal Login

In today's digital age, online transactions have become an essential part of our lives. We shop online, pay bills, and send money to friends and family electronically. However, with the rise of online transactions, the need for secure payment systems has also increased. PayPal is one of the most popular online payment systems that offers secure and convenient payment options for individuals and businesses worldwide.

https://sites.google.com/view/paypal-loginsignin/

https://sites.google.com/metamaslogi.com/metamaskextension/home
 on 11/3/2023 12:29 AM
1 - 10Next

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body *


Today's date *

Select a date from the calendar.
Please enter today's date so I know you are a real person

Twitter


Want a message when I reply to your comment? Put your Twitter handle here.

Attachments

 

 SysKit