Stage 10 of 17
Security for the Leave Request Application operates at two levels: SharePoint permissions (who can access the data store) and Power Apps app-level controls (what users can see and do in the app). In this stage you will configure both layers and understand why both are necessary.
Why Are We Doing This?
The security model has two layers. Understanding both is essential.
Layer 1 — SharePoint Permissions (Server-Side)
SharePoint permissions control who can access the site and the list at all. This is enforced by the server — it cannot be bypassed by the app. Even if a user navigates directly to the SharePoint list URL, they will only see what their permissions allow.
For this solution, all users need at least Read access to the SharePoint site (to connect the Power Apps data source). The Power Apps app then applies additional filtering to show each user only their own records.
Layer 2 — Power Apps App Controls (Client-Side)
The Power Apps app uses Filter() formulas to show each employee only their own records. The Administration screen is hidden from non-admin users using the Visible property.
Important limitation: Client-side controls can be bypassed. A user with SharePoint Edit access could navigate directly to the SharePoint list and see all records. For a production system, you would use row-level security or item-level permissions to enforce data isolation at the server level. For this learning application, the combination of SharePoint permissions and app-level filtering is sufficient.
Site Owners
Full ControlMembers
Marcus Webb (IT Manager)
Can Do
Everything: manage permissions, edit list configuration, manage flows, view all data.
Cannot Do
Nothing is restricted.
Site Members
EditMembers
Power Automate service account (the account used to run the flow)
Can Do
Create, read, update, and delete list items. The flow needs Edit permission to update the Status, Approver, Decision Date, and Approver Comments fields.
Cannot Do
Manage site permissions or list configuration.
HR Viewers
ReadMembers
Aisha Patel (HR Coordinator), Rachel Okonkwo (Head of HR)
Can Do
Read all list items. Export to Excel. View all views.
Cannot Do
Create, edit, or delete list items. Approve or reject requests.
App Users
ReadMembers
All employees who will use the Power Apps app
Can Do
Read list items (the app's Filter() formula restricts what they see to their own records). The app uses Patch() to create and update records on their behalf — this requires the app to use the connection of the logged-in user, who needs at least Contribute permission.
Cannot Do
See other employees' records (enforced by the app filter). Edit approval fields directly.
Common Mistake
Navigate to the Leave Request System SharePoint site.
Select the Settings icon (gear icon) → "Site permissions". The exact location may vary — look for "Permissions" in the site settings.
Review the existing permission groups. The site was created with default Owner, Member, and Visitor groups.
Add Marcus Webb to the Site Owners group (Full Control). He may already be there as the site creator.
Add Aisha Patel and Rachel Okonkwo to the Site Visitors group (Read). This gives them read access to all list items for HR reporting.
For all employees who will use the app: add them to the Site Members group (Edit/Contribute). This allows the app to create and update records on their behalf.
Verify that "Everyone except external users" or similar broad groups are NOT in the permissions list. The site should be private (only named users).
Verify the Power Automate flow connection: open the flow and check that the SharePoint connection is authenticated with an account that has Edit permission on the site.
SharePoint supports item-level permissions — the ability to restrict which rows a user can see, not just whether they can access the list at all. This is more secure than relying on the app's Filter() formula, but it is more complex to configure.
Item-Level Permissions in Microsoft Lists
Microsoft Lists supports two item-level permission settings for a list:
Read access: Read items that were created by the user
Users can only read items they created. This would prevent employees from seeing each other's requests — but it would also prevent HR from seeing all requests.
Create and Edit access: Create items and edit items that were created by the user
Users can create items and edit only their own items. This is closer to what we need for employees.
To configure item-level permissions: List settings → Advanced settings → Item-level permissions. However, item-level permissions interact with the Power Automate flow in complex ways — the flow needs to be able to update any item, not just items it created. For this lab, we use the simpler approach of app-level filtering. Item-level permissions are noted here as a future improvement.
Complete the following security checks to verify the permission model is working correctly.
Check 1: Employee can submit a request
Steps
Sign in as an employee (or use your own account if you are testing as an employee). Open the Power Apps app. Submit a new leave request. Verify the request is created in the list.
Expected result: Request created successfully. Status = Submitted.
Check 2: Employee cannot see other employees' requests
Steps
Sign in as Employee A. Open the My Requests screen. Verify only Employee A's requests are shown. Sign in as Employee B. Verify only Employee B's requests are shown.
Expected result: Each employee sees only their own requests in the app.
Check 3: HR can see all requests
Steps
Sign in as Aisha Patel (HR Coordinator). Open the Power Apps app. Navigate to the Administration screen. Verify all requests from all employees are shown.
Expected result: All requests visible in the Administration screen.
Check 4: Employee cannot edit approval fields
Steps
Sign in as an employee. Open a request in Request Details. Verify the Status, Approver, Decision Date, and Approver Comments fields are read-only (they are Labels, not inputs).
Expected result: Approval fields are displayed but cannot be edited through the app.
Check 5: Flow can update the list record
Steps
Submit a test request. Approve it via the approval email. Verify the list record is updated with Status = Approved, Approver name, Decision Date, and Approver Comments.
Expected result: All four fields updated correctly by the flow.
Application Support View
Need more help with the concepts?
Visit DosToDigital for guides, templates, and deeper explanations.