sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Sites.Selected delegated permission not working with SPFx web part

Open a1mery opened this issue 1 year ago • 1 comments

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
  • [X] 💥 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

  • SPFx v1.18.2
  • Node.js v18.18.0

Describe the bug / error

Sites.Selected delegated permission does not work as expected with SPFx web part using Microsoft Graph API to get a SharePoint site.

Steps to reproduce

  1. Build a SPFx web part to get a specific SharePoint site using the Microsoft Graph API (MSGraphClientV3)
  2. Deploy the web part requiring Sites.Selected permission: "webApiPermissionRequests": [ { "resource": "Microsoft Graph", "scope": "Sites.Selected" } ]
  3. The site can be retrieved even if no specific permission is granted for the site. All SharePoint sites the user can access can be retrieved from the web part.

Expected behavior

Only sites with specific permission/role can be retrieved from the SPFx web part.

a1mery avatar Mar 05 '24 22:03 a1mery

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Mar 05 '24 22:03 ghost

Thank you for taking the time to file an issue. We periodically archive older or inactive issues as part of our issue management process, which automatically closes them once they are archived.

If you’d like to understand more about why and how we handle archived (closed) issues, please see Our approach to closed issues.

We appreciate your contribution and if this is still an active issue with the latest SPFx versions, please do resubmit the details. We needed to perform a cleanup, so that we can start with a clean table with a new process. We apologize for the inconvenience this might cause.

github-actions[bot] avatar May 03 '25 16:05 github-actions[bot]