API Permissions disappear from SharePoint admin center
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
- [X] 💥 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
- Microsoft Edge Version 93.0.961.52 (Official build) (64-bit)
- Chrome Version 93.0.4577.82 (Official Build) (64-bit)
- SPFx version 1.12.1
- Node.js version 14.15.0
Describe the bug / error
SPFX (12.1) package deployed into the app catalog prompts the API permission approval within the SharePoint admin center (/_layouts/15/online/AdminHome.aspx#/webApiPermissionManagement)
As shown in the gif the pending permission requests appear. Once approved they immediately disappear.
Seen in two tenants. In one the web parts works fine.
The other tenant has issues querying the /teams/{team-id}/channels/{channel-id}/messages endpoint stating that "ChannelMessage.Read.All" is required
"webApiPermissionRequests": [{ "resource": "Windows Azure Active Directory", "scope": "User.Read.All" },{ "resource": "Microsoft Graph", "scope": "Files.Read" },{ "resource": "Microsoft Graph", "scope": "ChannelMessage.Read.All" },{ "resource": "Microsoft Graph", "scope": "Group.ReadWrite.All" }] },

package.json { "name": "broken-web-part", "version": "1.0.0", "private": true, "main": "lib/index.js", "engines": { "node": ">=0.10.0" }, "scripts": { "webpack": "webpack", "build": "gulp bundle", "clean": "gulp clean", "serve": "gulp bundle --custom-serve --max_old_space_size=4096 && fast-serve", "test": "./node_modules/.bin/jest --config ./config/jest.config.json", "test:watch": "./node_modules/.bin/jest --config ./config/jest.config.json --watchAll" }, "dependencies": { "@fluentui/react": "^8.23.10", "@microsoft/mgt": "^2.0.0", "@microsoft/mgt-react": "^2.2.1", "@microsoft/mgt-spfx": "^2.2.1", "@microsoft/rush-stack-compiler-3.7": "^0.6.37", "@microsoft/sp-office-ui-fabric-core": "1.12.1", "@microsoft/sp-webpart-base": "1.12.1", "@pnp/graph": "^2.0.13", "@pnp/sp": "^2.0.13", "@pnp/spfx-controls-react": "1.16.0", "@pnp/spfx-property-controls": "1.16.0", "@uifabric/file-type-icons": "^7.4.4", "@uifabric/fluent-theme": "^7.4.47", "adaptive-expressions": "^4.14.1", "adaptivecards": "^2.9.0", "adaptivecards-fluentui": "^0.5.3", "adaptivecards-templating": "^2.1.0", "classnames": "^2.2.6", "del": "^6.0.0", "gulp-delete-file": "^1.0.2", "gulp-rename": "^2.0.0", "gulp-sequence": "^1.0.0", "markdown-it": "^12.1.0", "moment": "^2.24.0", "netlicensing-client": "^1.2.19", "quill": "^1.3.7", "react-moment": "^0.9.6", "react-render-html": "^0.6.0" }, "resolutions": { "@types/react": "16.8.8" }, "devDependencies": { "@microsoft/rush-stack-compiler-3.7": "^0.6.37", "@microsoft/sp-build-web": "1.12.1", "@microsoft/sp-core-library": "1.12.1", "@microsoft/sp-module-interfaces": "1.12.1", "@microsoft/sp-property-pane": "1.12.1", "@microsoft/sp-tslint-rules": "1.12.1", "@microsoft/sp-webpart-workbench": "1.12.1", "@types/mocha": "2.2.38", "@types/webpack-env": "^1.16.2", "@voitanos/jest-preset-spfx-react16": "^1.4.0", "ajv": "~5.2.2", "cross-env": "7.0.2", "gulp": "4.0.2", "gulp-clean": "^0.4.0", "gulp-util": "^3.0.8", "jest": "25.5.4", "node-sass": "4.13.1", "office-ui-fabric-react": "7.156.0", "react": "16.9.0", "react-dom": "16.9.0", "spfx-fast-serve-helpers": "~1.12.0", "webpack-env": "^0.8.0" } }
Steps to reproduce
- Build a web part with version 12.1
- Upload to app catalog and deploy
- Approve permissions in SP admin center
- Refresh the page and watch them disappear
Expected behavior
- Build a web part with version 12.1
- Upload to app catalog and deploy
- Approve permissions in SP admin center
- Refresh the page and see them again \o/
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Thank you @Ryan365Apps - we have found the issue and a fix is made and will be rolling. We are looking into short-term mitigations in the meantime. Would you like to have instructions on how to check the permissions in the AAD portal?
Thanks, @patmill. The permissions in AAD appear fine and now the web part is working OK. No longer complaining about "ChannelMessage.Read.All".
Hello, Since closing this I've had 2 more customers experience this issue. Is it possible I could get some more background on the issue and fix rollout, please?
I don't believe this is related to the version of SPFX but is more generally to do with the API permission page. Can you confirm this?
It would also be great to get an idea of the timeline to fix as I'm not certain how to explain this to customers (and prospective customers)
And lastly can you confirm that setting the graph permissions on the SharePoint Online Client Extensibility Web Application Principal via AAD is the workaround? (I haven't been able to confirm with customer contacts yet)
The fix will be rolling over the next week or two. The workaround, as you state, is to go to AAD to view the permissions.
We believe the fix has reached 100% Production environment. Can you please check and see if the issue still remain?
Unfortunately, the issue still exists.
This is my own production tenant - dae9a39d-2bb1-4db6-aa2f-1ad3e244b7b3

@Ryan365Apps Could you please check again? We realized the rollout cadence was different for the admin page, and it should have been fixed on the 18th instead.
Hi, Yes this is fixed. Thanks
perfect, thanks @Ryan365Apps for the feedback. I'm going to close this issue
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues