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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Request Leave App - Mi...
Power Apps
Answered

Request Leave App - Microsoft template app

(0) ShareShare
ReportReport
Posted on by 15

Hi there, I have set up the Request Leave app for my company and but there are a few issues which I'm hoping I might be able to get help on.

 

Currently a user could technically send the request to themselves and approve their own holiday, is there a way to lock this down to only their manager and perhaps one other delegate?

 

Also not overly keen on the fact that the database for it is an excel file on OneDrive as users could access the file and see the leave balance and requests of other employees.

 

Any suggestions on how to overcome this?

 

Many thanks 🙂

Categories:
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @EmilyS :

    Q1: is there a way to lock this down to only their manager and perhaps one other delegate?

    Please try this solution:

    Set

    ChangeApproverScreen-GalleryChangeApprover's OnSelelct property to:

     

    If(ThisItem.Mail=Office365Users.Manager(User().Email).Mail || ThisItem.Mail in ["mail1@xx.com","mail2@xx.com"],
    Set(_selectedApprover, ThisItem);
    Set(_selectedApproverPhoto, Office365Users.UserPhoto(ThisItem.Id));
    Back(),Notify("Invalid approver"))
    

     

    1.JPG

    In this way, the user can only choose his manager or designated user as the approver.

    Q2: Also not overly keen on the fact that the database for it is an excel file on OneDrive as users could access the file and see the leave balance and requests of other employees.

    If you use Excel as a data source, as long as the user has access to this file. Then he can get all the data in the file.
    For this, I suggest you use Dataverse table instead of excel table. (You only need to set the user's permission level to user, then he can only access the records he created)

    I think these links will help you a lot:

    Security concepts in Microsoft Dataverse 

    Configure user security to resources in an environment 

    Best Regards,

    Bof

  • EmilyS Profile Picture
    15 on at

    Thanks for your help, this worked! 🙂

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard