When a SPFx solution is installed the Web API Permission Request should be showed once in the API management.
When I install a SPFx solution with 'webApiPermissionRequests', the API Management shows the same request twice in Pending Approval.

Install a SPFx solution with one webApiPermissionRequest.
"webApiPermissionRequests": [
{
"resource": "**********.SPFx.API",
"scope": "user_impersonation"
}
],
Tried several different solutions, all have the same issue in our tenant.
What are the exact steps that you're following? Every time you deploy the solution in the app catalog, a new permission request will be added to the list. Could it be, that you deployed your solution multiple times?
I'm able to reproduce it by dragging and dropping a solution in the App Catalog and overwritting an existing solution. Next I check-in the file.
After drag/dropping the package, it's checked out in the library and only one approval request is added. When I check-in the file, the second Approval Request is created for the same solution.
Right, so the solution has been previously deployed and you're updating it, which triggers re-issuing the permission requests from the solution.
The UX here has a few issues. Here's a (not complete) list of what we are addressing around here. Errors will be reported in the UX (not as a red line saying 400 error), duplicates won't show up, and each permission for the same service scope will appear separately (so 4 permissions against graph will show up as 4 lines).
The follwing are the steps followed by me.
1.Creating WedAPI in visual studio .
2.Creating app in azure.
3.Adding WebAPI in created app (appname:-AADApp).
4.Creating SPFX solution.
5.Adding WebAPIpermissionrequest as
"webApiPermissionRequests": [
{
"resource": "AADApp",
"scope": "User.ReadBasic.All"
}]
6.Deployed solution of an spfx in appcatalog.
7.Added int o sitecontents.
8.Here it's not showing any permissions to approve in apimanagement.
Was the solution deployed without any errors?
The other thing to check is if it was deployed less than 20 minutes after you created the app catalog. If it was, redeploy and they will appear.
Get Outlook for iOShttps://aka.ms/o0ukef
From: Waldek Mastykarz notifications@github.com
Sent: Thursday, March 29, 2018 3:05:07 AM
To: SharePoint/sp-dev-docs
Cc: Pat Miller (SHAREPOINT); Comment
Subject: Re: [SharePoint/sp-dev-docs] Web API Permission Requests are shown twice in API Management (#1389)
Was the solution deployed without any errors?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/SharePoint/sp-dev-docs/issues/1389#issuecomment-377187715, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADl-SUwHEZIB8cWlwb_69vOPrq4WlgFwks5tjLHTgaJpZM4SPBT-.
no ,there were no errors when solution deployed and it is less than 20 minutes after deployment done in my app catalog.
I am also getting error like"Uncaught (in promise) Error: This operation cannot be performed until the AadTokenProvider is initialized." in workbench.html.
when I am performing "gulp serve".
-> when i deployed solution in app catalog and with out approving permissions i am using the spfx web part .
But here it was showing error like
sp-pages-assembly_en-us_bbf1ba8e18797f770e10fb0068654369.js:602 Uncaught (in promise) Error: AADSTS50001: The application named "--application name is here--" was not found in the tenant named "--tenant name is here--". This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant.
Trace ID: 55be378a-bf9e-47ef-847d-48067a170e00
Timestamp: 2018-03-30 07:35:02Z
at Array.
at _callBackMappedToRenewStates.(/sites/DLRDestination/SitePages/anonymous function)._callBackMappedToRenewStates.(anonymous function) (https://spoprod-a.akamaihd.net/files/sp-client-prod_2018-03-16.021/0.sp-http-adal_4a41848c866052caa755.js:3:7561)
at AuthenticationContext.handleWindowCallback (adal.min.js:2)
at parseTokenFromUrl (spfxsinglesignon.aspx:23)
at onload (VM1413 spfxsinglesignon.aspx:30)
Right, so the solution has been previously deployed and you're updating it, which triggers re-issuing the permission requests from the solution.
Is there any plan to address this? Or is there an alternate way to update a solution? Having to tell a user to delete requests anytime they update our app isn't an ideal solution.
Hey @lworkman - is your question "will the admin page stop showing requests for scopes that have already been granted"? If so, the answer to that is yes. It's a bug, and we will get it cleaned up.
Thanks for the info @patmill - is there an github issue somewhere I can subscribe to?
Not that I am aware of. I know we have our own "clean up the admin UX" work item on our backlog.
@patmill any progress on this?
During development this means getting LOTS of requests in the admin panel.
Also, it seems there is a limit of 100 items that are being shown in the list.
Most helpful comment
@patmill any progress on this?
During development this means getting LOTS of requests in the admin panel.
Also, it seems there is a limit of 100 items that are being shown in the list.