SPFx causes triple page reload when calling custom API with pending permission grant #10295
Open
1 of 9 tasks
Labels
area:spfx
Category: SharePoint Framework (not extensions related)
type:bug-confirmed
Confirmed bug, not working as designed / expected.
type:bug-suspected
Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Uh oh!
There was an error while loading. Please reload this page.
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
Additional environment details
Describe the bug / error
Issue Summary
We have encountered a critical issue affecting multiple tenants since May 2025. Whenever a SharePoint Framework (SPFx) package attempts to retrieve a token from a custom API for which a permission is still pending (neither approved nor rejected), the SharePoint page reloads three times automatically.
This behavior is repeated just once for a period of between 2 and 5 minutes (I don't know exactly, I guess there's a cache) and then refreshes 3 times again on the next navigation.
This behavior occurs systematically and seems to be introduced after the recent change described in the following article: Changes on SharePoint Framework (SPFx) permission grants in Microsoft Entra ID.
Technical Observation
Before each page reload, the following request is made:
GET https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/authorize
And include the following payload:
This request results in an HTTP 302 redirect with the following header:
Location: https://{tenant}.sharepoint.com/_forms/spfxsinglesignon.aspx
And includes the following error details in the query string on this Location:
Impact
Steps to reproduce
HelloWorld
SPFx project of typeApplicationCustomizer
using SPFx version 1.21.1.package-solution.json
file, add a custom API permission under thewebApiPermissionRequests
section (e.g., for a custom Entra ID app).HelloWorldApplicationCustomizer.ts
file, retrieve a token for the custom API using the following code:.sppkg
file to the App Catalog, deploy it, and ensure it is enabled by default.getToken()
is called.Expected behavior
The page should remain stable and handle the permission request gracefully without causing reloads, even if the permission is pending.
The text was updated successfully, but these errors were encountered: