cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
leo85
Super User
Super User

Get users and security roles for all environment

Hi,

as part of our monitoring of the Power Platform and users permissions I'm trying to get a list of users with their associated security roles for all environments that have a Dataverse database.

 

According to this post, this is not possible, but the post is already quite old, so things might have changed.

 

In this post they explain that you need to add a "set" suffix to the table relationship name, but for me this does not work (see screenshot). I get an error "table not found".

 

leo85_0-1651756386726.png

 

Using the expand query with the "Users" table also does not work (there is no error, but no data is retrieved about the user roles).

leo85_1-1651757598446.png

 

Edit: When I use the current Dataverse connector (instead of the legacy one), it does work, but only for the current environment. This is unfortunately not sufficient, because we have 200+ environments and I can't replicate the flow this many times.

leo85_1-1651762606882.png

 

 

Does anybody know how to get the information without doing it by hand?

 

Regards

2 REPLIES 2
v-bofeng-msft
Community Support
Community Support

Hi @leo85 ,

 

Please try:

items('Apply_to_each')?['properties/linkedEnvironmentMetadata/instanceUrl']

vbofengmsft_0-1652065750682.png

 

Best Regards,

Bof

leo85
Super User
Super User

Hi @v-bofeng-msft ,

thank you for the reply. Unfortunately, accessing the environment itself is not the problem, but getting the right data from the table. My flow is using the code you supplied.

 

leo85_0-1652076624521.png

 

Regards

Leo

 

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,264)