cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Wedlib
Advocate II
Advocate II

Get the list of user with access to the App

Hi,

 

I'm trying to list in the app the list of all users with access.

 

After some investigation, I found this connector. But I'm having difficulty making it happens.

Insite App, OnStart I add:

ClearCollect(AppUsers,

                                    PowerAppsforAdmins.GetAdminAppRoleAssignment("Organization ID","App ID").value

                   )

It loads the columns name for the collection but, with no data. (id,name,property,type)

 

Not sure if it's the wrong command to use or a problem with the implementation.

 

thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
GarethPrisk
Resident Rockstar
Resident Rockstar

Simple way to get both is to find the app in the list at https://make.powerapps.com

Click on the ellipsis (...) and select 'Details'

The URL has both the environment and app, if you want static values to test with.

GarethPrisk_0-1626383754268.png

You can get the app ID from the connector via other actions, but the environment URL is a bit trickier.

View solution in original post

7 REPLIES 7
GarethPrisk
Resident Rockstar
Resident Rockstar

That looks mostly correct. It is value, not values - BTW

PowerAppsforAdmins.GetAdminAppRoleAssignment(
    "aa718629-6144-43a9-a86e-24115b6c4cb9",
    "dbd093fa-7521-4e70-bfc4-30f67ede0489"
).value

Formula above will return a table of rows. The properties column, can be expanded to show the displayName of the shared object (user or group). Below would expand it to show the name in a label in a gallery or table.

ThisItem.properties.principal.displayName

 

sorry, my typo here. it's "value". I'm editing post.

 

The problem is it doesn't load results to the Collection, just the fields

GarethPrisk
Resident Rockstar
Resident Rockstar

ClearCollect(
    colUserRoles,
    PowerAppsforAdmins.GetAdminAppRoleAssignment(
        "aa718629-6144-43a9-a86e-24115b6c4cb9",
        "dbd093fa-7521-4e70-bfc4-30f67ede0489"
    ).value
)

This appears identical to yours. In my case, it is returning results into the collection. Is the app/environment you're using a valid app, with users/groups who have the app shared to them.

GarethPrisk_0-1626371258315.png

 

just to make sure, the function asks for "Environment ID" and "App ID" parameters.

So, I need to use the "Environment ID" in the "Organization ID", that I get in the admin.powerplatform like below, right?

 

Wedlib_0-1626381352955.png

 

GarethPrisk
Resident Rockstar
Resident Rockstar

Simple way to get both is to find the app in the list at https://make.powerapps.com

Click on the ellipsis (...) and select 'Details'

The URL has both the environment and app, if you want static values to test with.

GarethPrisk_0-1626383754268.png

You can get the app ID from the connector via other actions, but the environment URL is a bit trickier.

Great! It was the environment id. got following your instruction and it's working now

thank you so much!!

Dessa forma na Galeria, exibe apenas códigos, eu precisava que exibisse o nome dos usuários como você fez?

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,372)