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

Determine if Current User is an Owner/Co-Owner

Within an app, is it possible to determine if the current user is an Owner/Co-Owner or just a User as specified in the Share settings of the app?  I want to include admin functionality within the app for the Owner/Co-Owners.  

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @JimSutt :

Do you want to obtain the current user's permissions for the application?

If so,you can try Power Apps for makers connector.I'v made a test for your reference:

 

LookUp(
    ForAll(
        PowerAppsforMakers.GetAppRoleAssignment("8af9d779-xxx-xxxx-7eb7534d72ae").value,/*The parameter is your APP ID*/
        {
            User: properties.principal.email,
            Role: properties.roleName
        }
    ),
    User = User().Email
).Role

 

The Result:

1.JPG

I also used other accounts to test

v-bofeng-msft_0-1616737926718.jpeg

I think these links will help you a lot:

Power Apps for Makers 

Connectors - How to display lists of apps from within an app 

Best Regards,

Bof

 

 

 

View solution in original post

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

Hi @JimSutt :

Do you want to obtain the current user's permissions for the application?

If so,you can try Power Apps for makers connector.I'v made a test for your reference:

 

LookUp(
    ForAll(
        PowerAppsforMakers.GetAppRoleAssignment("8af9d779-xxx-xxxx-7eb7534d72ae").value,/*The parameter is your APP ID*/
        {
            User: properties.principal.email,
            Role: properties.roleName
        }
    ),
    User = User().Email
).Role

 

The Result:

1.JPG

I also used other accounts to test

v-bofeng-msft_0-1616737926718.jpeg

I think these links will help you a lot:

Power Apps for Makers 

Connectors - How to display lists of apps from within an app 

Best Regards,

Bof

 

 

 

JimSutt
Advocate II
Advocate II

Thank you @v-bofeng-msft !  This is perfect!  

 

For those using this solution, the following outcomes are possible based on the app's Share settings:

"Owner" = Owner

"CanEdit" = Co-Owner

"CanView" = User

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.

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,009)