Stage 10 of 17

Stage 10 of 17

Secure

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?

Leave request data is sensitive. An employee should not be able to see their colleagues' leave requests. A manager should not be able to approve requests from another manager's team. HR needs read access to all data for reporting. Getting the security model right is not optional — it is a professional and potentially legal requirement.

Security Model Overview

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.

Permission Groups

Site Owners

Full Control

Members

Marcus Webb (IT Manager)

Can Do

Everything: manage permissions, edit list configuration, manage flows, view all data.

Cannot Do

Nothing is restricted.

Site Members

Edit

Members

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

Read

Members

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

Read

Members

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

The App Users group needs Contribute permission (not just Read) to allow the Power Apps app to create and update records on their behalf. Contribute allows creating and editing items but not deleting them or managing the list. If you give employees only Read permission, the Patch() formula in the app will fail with an access denied error when they try to submit a request.

Configuring SharePoint Permissions

1

Navigate to the Leave Request System SharePoint site.

2

Select the Settings icon (gear icon) → "Site permissions". The exact location may vary — look for "Permissions" in the site settings.

3

Review the existing permission groups. The site was created with default Owner, Member, and Visitor groups.

4

Add Marcus Webb to the Site Owners group (Full Control). He may already be there as the site creator.

5

Add Aisha Patel and Rachel Okonkwo to the Site Visitors group (Read). This gives them read access to all list items for HR reporting.

6

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.

7

Verify that "Everyone except external users" or similar broad groups are NOT in the permissions list. The site should be private (only named users).

8

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.

Item-Level Permissions (Advanced)

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.

Security Check Exercise

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

When a user reports "I can see someone else's leave requests", the first question is: are they seeing this in the Power Apps app or directly in the SharePoint list? If it is in the app, the Filter() formula may be incorrect. If it is in the SharePoint list, the permissions model needs to be reviewed. These are two different problems with two different fixes.

Stage Complete — What You Now Have

  • ✓A two-layer security model: SharePoint permissions + Power Apps app controls
  • ✓Four permission groups configured: Site Owners, Site Members, HR Viewers, App Users
  • ✓Understanding of why Contribute permission is needed for employees (not just Read)
  • ✓Five security checks completed and verified
  • ✓Knowledge of item-level permissions as a future improvement
NextTest

Need more help with the concepts?

Visit DosToDigital for guides, templates, and deeper explanations.

DosToDigital
DToD Labs

Learn it. Build it. Make it work.

A DosToDigital Project

About DToD Labs

Practical technology learning for Microsoft 365 and Power Platform. Build real business solutions from real business problems.

Learn the concepts at DosToDigital. Put them into practice at DToD Labs.

DToD Labs provides practical learning projects for educational purposes. Microsoft services, interfaces, licensing and product capabilities change over time. Always check current Microsoft documentation and licensing before implementing a solution in a production environment. All organisations, business scenarios and data used in DToD Labs are fictional. Learners should not use confidential employer, customer or personal information when following DToD Labs exercises.

© 2026 DToD Labs — A DosToDigital Project