web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / OPEN THE APPLICATION O...
Power Apps
Answered

OPEN THE APPLICATION ON A SCREEN DEPENDING ON THE LOGGED USER AND COMPARED WITH THE "PERSON AND GROUP" COLUMN IN SHAREPOINT

(0) ShareShare
ReportReport
Posted on by

I HAVE A SHAREPOINT LIST WITH PERSON AND GROUP FIELDS AND WOULD LIKE TO START ON CERTAIN SCREENS DEPENDING ON THE LOGO USER

 

EXAMPLE:

 

IF THE USER LOGGED IN TO THE POWERAPPS IS ADMIN IT GOES TO A MORE IMPROVED SCREEN

 

IF THE USER IS STANDARD GOES TO A SIMPLE SCREEN WITH LESS PERMISSION

Categories:
I have the same question (0)
  • GarethPrisk Profile Picture
    2,828 on at

    Please consider writing your posts (and titles) without all-caps.

    This can be accomplished a number of ways:

    1. Derive something about the user to determine they're an admin, then redirect
      • Office365Users can get details
      • CDS has user views, and you can create system views for users with certain security roles
      • SharePoint have a list of Admins, and then you check the list to see if the User() is in it
    2. Using a parameter in the URL used to launch the app, to redirect

     

    Method #1 is more secure and reliable. Method #2 works well, but should not be considered secure. Once folks learn (even by reading this), they will be able to insert their own parameters into the URL as needed.

  • Gorilla_8 Profile Picture
    on at

    Hi @GarethPrisk 

    Hello @GarethPrisk

     

    Sorry for the capital letters.


    I tried to use Office365Users, but it didn't work very well and I couldn't find a solution for my scenario.

     

    I'm going to try this list of SharePoint users, but I want that automatically by the user's login go straight to the screen without Param

     

    And again, sorry for the capital letters.

  • Verified answer
    GarethPrisk Profile Picture
    2,828 on at

    The list of users can definitely work. You will want a blocking pattern (like a loading screen) to allow you to check the user in the list, and then navigate.

    1. Top-most screen in your app; app opens this first
    2. Add a Button
      • UpdateContext({locUserRecord: LookUp(YourList, YourNameField = User().FullName)};
      • Then either
        • If(locUserRecord.FieldToCheck = Value, Navigate(AdminScreen), Navigate(NonAdminScreen));
        • If(!IsBlank(locUserRecord), Navigate(AdminScreen), Navigate(NonAdminScreen));
    3. Made the button invisible; add a logo/animation/blocking pattern
    4. On you top-most screen, set the OnVisible
      1. Select(Button)

    This will click the button (as though a user clicked it), then once it's determined if they're an admin and/or in the list, then it will navigate. Good luck!

     

    No worries about the all-caps. I just assume you don't want folks to think you're yelling. 😉

  • Gorilla_8 Profile Picture
    on at

    @GarethPrisk 

    You are a god! Thank you very much!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard