Skip to content

Commit 28bad85

Browse files
Update Get users who create most flows.md
1 parent eeb9097 commit 28bad85

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

articles/English/PowerPlatform/Get users who create most flows.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,41 @@ show_sidebar: false
99

1010
## Introduction
1111

12-
13-
Managing your flows using PnP is fabulously easy. Faster to code than CSOM, more options than classic SharePoint Online Management Shell. Using PnP you can easily retrieve users who are creating flows and extract data statistics.
12+
Using PnP you can easily retrieve users who are creating flows and extract data statistics. That allows you to get the most prolific Power Automate creators who created the most flows.
1413

1514

1615

1716
## Get Flow Properties
1817

19-
First, retrieve properties of the flow. Remember to use -AsAdmin switch. Otherwise you will get only your own flows.
18+
First, in order to see who created a flow, retrieve properties of the flow. Remember to use -AsAdmin switch. Otherwise you will get only your own flows.
2019
```
2120
Connect-PnpOnline
2221
$environment = Get-PnPPowerPlatformEnvironment
2322
$Flows = Get-PnPFlow -Environment $environment -AsAdmin | select -expandProperty Properties
2423
```
25-
24+
<img src="/articles/images/flow18.png" width="400">
2625

2726
One of those properties is the Creator. If you expand it, you obtain ObjectId, which is Azure Active Directory ObjectId.
28-
29-
27+
<img src="/articles/images/flow104.png" width="400">
3028

3129
Using ```Group-Object``` and ```Sort-Object``` cmdlets, you get the users who created most flows.
3230
```
3331
$props.Creator | Group-Object -Property ObjectId -NoElement | Sort-Object -Descending
3432
```
3533

36-
34+
<img src="/articles/images/flow19.png" width="400">
3735

3836

3937
## Get Azure Active Directory Users
4038

41-
4239
Use Azure Active Directory ObjectId to obtain user's UPN or email address.
4340
```
4441
Connect-MSOLService
4542
Get-MsolUser | where {$_.ObjectId -eq "f655dd56-ffea-45ad-aa45-775e4e0eeb9b"}
4643
```
4744

4845

46+
<br/>
4947
## Full Script
5048
```
5149
Connect-PnPOnline
@@ -63,6 +61,6 @@ $MostProlific | Foreach-Object {
6361
$user | Export-CSV -Path yourcsvpath.csv -Append
6462
}
6563
```
66-
64+
<img src="/articles/images/flow21.png" width="400">
6765

6866

0 commit comments

Comments
 (0)