cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Marty_Dub
Helper II
Helper II

Export user list

Has anyone found a way to export a list of users assigned to an app which doesn't involve having to use Powershell?  I don't have sys admin rights on our network (thus they won't give me Powershell access) however am responsible for 50+ apps spanning thousands of users.  Keeping track of who has access to what is doing my head in.

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisPiasecki
Super User
Super User

Hi @Marty_Dub ,

 

Is the output a PowerShell object? If so you should be able to pipe the object out to JSON using  | ConvertTo-Json. Once the output is JSON than you should be able to work with the object

  • Copy the JSON output to your clipboard or somewhere
  • Edit your flow, add a parse JSON action step
  • Generate a schema by pasting in the JSON output.
  • You can now work with the output of parse JSON action like other attributes from your other flow steps.
  • The output should have an array, so you can add an Apply to Each step.
  • Within the apply to each you can add a Compose action to form a row with just the attributes you want to include in your export.
  • Within the apply to each you can use the Excel Online connector and its Add a row into a table action, using the output of the Compose action step. Note you'll need to create this Excel file / table ahead of time so you can use it as a template (you can use the OneDrive or SharePoint create a file action to create a copy of the Excel template prior to populating it with the data).

 

Give that a try and let me know how it goes.

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

4 REPLIES 4
v-qiaqi-msft
Community Support
Community Support

Hi@Marty_Dub,

Based on the issue that you mentioned, do you want to get all the users who are assigned to an app?

Could you please share a bit more about the scenario?

Actually, PowerShell does have an available command you can use to get a list of Power Apps app owners and users.

Get-PowerAppRoleAssignment -AppName "AppID of PowerApp"

Since you do not have access to it, just ignore this.

If you want to get a list of Power Apps app owners and users in Power Apps, I am afraid that there is no direct way to achieve this currently.

Here is a similar idea you can vote for:

Ability to export shared users name - Power Platform Community (microsoft.com)

As an alternative solution, you could get a list of shared user here:

(choose an app -> choose ...->choose Share)mmm.png

Hope it could help you.

Regards,

Qi

Best Regards,
Qi
ChrisPiasecki
Super User
Super User

Hi @Marty_Dub,

 

To add to @v-qiaqi-msft's response, if you are restricted with PowerShell on the local machine, you could look at using an Azure Runbook to run PowerShell cmdlets. You can then then invoke the Runbook in a Power Automate flow since there is a connector available today.

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

Hi @ChrisPiasecki  - that's amazing, thank you. I've successfully created the flow and am seeing an output which is encouraging.  What would be the easiest way to convert this output into a CSV do you think?  I'm currently just getting a web page full of a raw data dump which doesn't concert over as simply as I thought it would.

ChrisPiasecki
Super User
Super User

Hi @Marty_Dub ,

 

Is the output a PowerShell object? If so you should be able to pipe the object out to JSON using  | ConvertTo-Json. Once the output is JSON than you should be able to work with the object

  • Copy the JSON output to your clipboard or somewhere
  • Edit your flow, add a parse JSON action step
  • Generate a schema by pasting in the JSON output.
  • You can now work with the output of parse JSON action like other attributes from your other flow steps.
  • The output should have an array, so you can add an Apply to Each step.
  • Within the apply to each you can add a Compose action to form a row with just the attributes you want to include in your export.
  • Within the apply to each you can use the Excel Online connector and its Add a row into a table action, using the output of the Compose action step. Note you'll need to create this Excel file / table ahead of time so you can use it as a template (you can use the OneDrive or SharePoint create a file action to create a copy of the Excel template prior to populating it with the data).

 

Give that a try and let me know how it goes.

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,217)