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 / Fetch each Flow, servi...
Power Automate
Answered

Fetch each Flow, service accounts and connectors for an Environment

(2) ShareShare
ReportReport
Posted on by 169
Is there a way to get the name of each Flow which is mine or has been shared with me?  I also want to know which connectors its using and which account it uses to use the connectors.
Categories:
I have the same question (0)
  • Suggested answer
    Haque Profile Picture
    3,653 on at
     
    PowerAutomate admin apis and Microsoft.PowerApps.PowerShell  are your friends.
     
    Please let me know if this tharead helps.
     
     
    We have a community thread here. Additinally, you have knowlege surfing this
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
  • AH-02011058-0 Profile Picture
    169 on at
    I put this code at the top of the script to make it run.
    Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
     
    How do I get the name of the account eg a service account using each connector?
  • Suggested answer
    Haque Profile Picture
    3,653 on at
     
    You can try this command:
    Get-AdminFlow -EnvironmentName "Default-<GUID>" | 
        Select DisplayName, @{Name="Connectors";Expression={$_.Properties.connectionReferences.Keys}}
    
    This shows which connectors (e.g., SharePoint, Outlook, Dataverse) are used.
     
    Get-AdminConnection
    This returns:
    • Connector type (e.g., shared_sharepointonline, shared_office365)
    • User principal (the account used for authentication)
    • Environment

     

     
     
  • AH-02011058-0 Profile Picture
    169 on at
    How does that fit in with the Powershell script you mentioned earlier.  This is what I've tried.  AccountDetails is blank.
     
     
    $FilePath = "C:\FlowConnectorsAndAccounts\FlowsExport.csv"
    $Flows = Get-AdminFlow
    "Name" + "," + "Enabled" + "," + "Connectors" | Out-File $FilePath
    ForEach ($Flow in $Flows)
    {
        $FlowInfo = Get-AdminFlow -FlowName $Flow.FlowName -EnvironmentName $Flow.EnvironmentName
        $Connectors = $FlowInfo.Internal.properties.connectionReferences
        $ConnectorDetails = ""
        $Connectors.PSObject.Properties | ForEach {
             $ConnectorDetails += $_.Value.DisplayName + " | "
        }
        $AccountDetails = ""
        $Connectors.PSObject.Properties.connectionReferences.Keys | ForEach {
             $AccountDetails += $_.Value.DisplayName + " | "
        }
        ($Flow.DisplayName.Replace(","," ")) + "," + $Flow.Enabled + "," + $ConnectorDetails + "," + $AccountDetails | Out-File $FilePath -Append
    }
     
  • AH-02011058-0 Profile Picture
    169 on at
    I can run 
    Get-AdminFlow
    However when I try Get-AdminConnection I get this error message.
    Get-AdminConnection : The term 'Get-AdminConnection' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the 
    name, or if a path was included, verify that the path is correct and try again.
  • Suggested answer
    Haque Profile Picture
    3,653 on at
    Hi,
     
     

    Instead of Get-AdminConnection, you should use:

    Get-AdminConnectionReference -EnvironmentName "Default-<GUID>"

  • AH-02011058-0 Profile Picture
    169 on at
    I typed Get-AdminConnectionReference -EnvironmentName "Default-xxx".  I also tried without Default-.
    Still saying
     
    The term 'Get-AdminConnectionReference' is not recognized as the name of a cmdlet
  • Suggested answer
    Haque Profile Picture
    3,653 on at
     
    Did you import mdoule like this?
     
    Import-Module Microsoft.PowerApps.Administration.PowerShell
    Can you please do some study on this item:  Get-AdminPowerAppConnectionReferences
     
  • AH-02011058-0 Profile Picture
    169 on at
    AdminPowerAppConnectionReferences pertains to powerapps rather than Flows.
     
    We're trying to keep track of which Flows use which Service accounts and for what purpose.  This will help us track where we're spending money and avoid our Flows being throttled.
     
    Thanks for taking the time to respond to my questions, but I don't think I have what I need.
  • Suggested answer
    Haque Profile Picture
    3,653 on at
     
    We have to find a way! How urgent it is? Are you up for use PowerAutomate to acheive the same?

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard