SharePoint / SharePoint/sp-dev-docs

Access denied on folder with Form Customizer

Open
#9,893 6 comments 0 reactions 1 assignee View on GitHub

@Ashlesha-MSFT is already working on this.

Since Apr 24, 2025.

Needs: Triage :mag: sharepoint-developer-support type:bug-suspected type:uservoice-request
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested
  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)
Additional environment details
  • browser version
  • SPFx version
  • Node.js version
  • etc
Describe the bug / error

When a user only has Edit rights on a particular folder in a list (but Read on the list itself), form customizer page (SPListForm.aspx) generates Access Denied error when attempting to access New form for that folder. It seems it is checking permissions for the list, but not for the folder.

Steps to reproduce
  1. Create a form customizer SPFx solution
  2. On a list, enable folders and create a folder
  3. Grant a user Edit rights on the folder, but Read rights on the list
  4. When user attempts to add an item to the folder, SharePoint produces Access Denied error on SPListForm.aspx page, although the RootFolder query string parameter points to the folder that the user has Edit rights to
Expected behavior

When RootFolder query string parameter exists and points to an allowed folder, permissions check should succeed and form should operate normally.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.