SharePoint / SharePoint/sp-dev-docs

SharePoint Online PermMask cached wrong in Local Browser Storage / Service Worker

Open
#9,358 6 comments 0 reactions 2 assignees View on GitHub

@Ashlesha-MSFT is already working on this.

Since Jul 15, 2025.

area:pnp-libraries Needs: Attention :wave: sharepoint-developer-support type:bug-confirmed
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 REST API

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

No response

Describe the bug / error

I am not sure, if this is the correct Issue-List to post this topic since it's about the SharePoint Online client side caching / API issue. We build solutions using PnP/Js (SharePoint Rest API) and use the "PermMask" information on ListItems for permission information.

Simplified calls like:

  const folderItem = await webRef.getFolderByServerRelativePath(folderServerRelativeUrl).getItem()
  const folderItemData = await folderItem.select('Id, UniqueId, PermMask').get()

In the Network-Tab we can see the request handled by SharePoint correctly without error, but the PermMask returned is not correct. E.g. the user has Permissions to upload documents to this specific folder if we have a look in SharePoint directly (UI) but if we check the permission mask, it says, the user has only read permissions.

If we then press F12 > clear the whole cache (incl. service worker) with "Application" > "Storage" > "Clear site data" and only refresh the page (no code changes) we do get the correct PermMask and everything is working again.

This issue is happening for multiple users in multiple tenants now, but not reproduceable (at least for us) and reoccuring over time even if we removed the cache once.

Is anyone experiencing the same issues?

Steps to reproduce

We cannot finally reproduce this issue in steps. The only thing which is the same for all effected users that the only solution is to clear the cache incl. service worker.

Expected behavior

If the service worker is caching the list item incl. PermMask it should handle the update of the cache correctly in every case (e.g. even if the permissions are updated by Rest API calls as well)

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.