SharePoint / SharePoint/sp-dev-docs
Unable to approve SharePoint API Permissions: "Access can't be approved because you didn't accept the requested permissions"
Nobody has claimed this yet.
- 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
- All tested browsers (latest versions)
- SPFx version: 1.17.1
- Node.js version: 16.20.0
Describe the bug / error
In the past week or so (not sure exactly when) an App package which has previously installed without issues has stopped working. After adding the App to the App Catalog, we are unable to approve any API permissions. After clicking 'Approve' the following error is displayed as opposed to the pop-up to consent to the requested permissions:
We have tested this in multiple M365 tenants... so something must have changed in M365?
Steps to reproduce
NOTE: The app package has been installed into 100's of tenants since May 24. The app package has not changed since this date.
App Permissions are set in the "webApiPermissionRequests" array within the pakage-solution.json, example:
The following permissions are contained:
- "resource": "Windows Azure Active Directory" - "scope": "User.Read"
- "resource": "" - "scope": "user_impersonation",
- "resource": "Microsoft Graph" - "scope": "Sites.FullControl.All"
- "resource": "Microsoft Graph" - TermStore.Read.All
- "resource": "Microsoft Graph" - User.Read
The reply URL is formed as follows:
The reply URl's are all present within web section of the app registration within Entra
Expected behavior
On clicking 'Approve' on a pending 'API Access' request, we should be able to consent to requested permissions
Any ideas what has changed which means we not receive the reported error?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.