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

Unable to approve API permissions for SPFx solutions

Open Tanddant opened this issue 3 years ago โ€ข 13 comments

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

other (enter in the "Additional environment details" area below)

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

  • Chrome: Version 109.0.5414.120 (Official Build) (64-bit)
  • SPFx version: 1.15.2
  • Node.js version: v12.22.1
  • Both Targeted and non targeted release tenants
  • For instance on tenant https://2v8lc2.sharepoint.com/

Describe the bug / error

When attempting to approve API permissions in the admin center I'm meet with a error:

We can't display pending and approved requests right now. Try refreshing the page.

No amount of refreshing the page does anything, I've seen this across several tenants - and selecting a request and approving it seemingly does nothing, also no errors in the console or network inspector.

So currently there is no way to approve permissions (other than going through the AAD and granting it to the SharePoint Online Client Extensibility Web Application Principal directly - but this obfuscates the granted permissions from SharePoint admins.

image

Steps to reproduce

  1. Create a new SPFx project - version seems to be unrelated.
  2. Add a API Permission request, this can be to Graph or anywhere else, for instance:
"webApiPermissionRequests": [
      {
        "resource": "Microsoft Graph",
        "scope": "Calendars.Read"
      }
    ]
  1. Package and deploy your SPFx solution
  2. Go to the webApiPermissionManagement page (/_layouts/15/online/AdminHome.aspx#/webApiPermissionManagement)
  3. Attempt to approve the request permission.

Expected behavior

Normally there isn't a big red banner on the page, and approving permissions work.

Tanddant avatar Jan 31 '23 08:01 Tanddant

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

ghost avatar Jan 31 '23 08:01 ghost

cdx tenants don't seem affected, but I can see it on more than 20 tenants (production and development). Let me know if you need more details, just let me know if you need more details and which ones.

fredupstair avatar Jan 31 '23 09:01 fredupstair

thx @fredupstair for the updated scale on this and great insights on the CDX status vs normal production tenants. This is EXACTLY the information which will help engineering to triage the root cause as the CDX tenants have different rings for the new features ๐Ÿ‘

VesaJuvonen avatar Jan 31 '23 09:01 VesaJuvonen

same issue We can't display pending and approved requests right now. Try refreshing the page.

funzel1 avatar Jan 31 '23 15:01 funzel1

This issue affects all our tenants, ad we can no longer approve permissions from Api Access page. We even got our app rejected from SP Store publishing due to this issue.

giorgioprof avatar Jan 31 '23 15:01 giorgioprof

I'm having this issue on a few of our tenants as well. I cannot approve the permission via the SharePoint Admin UI. PowerShell doesn't work either. I also tried to use the "Approve-SPOTenantServicePrincipalPermissionRequest" PowerShell command, and I get back the following error:

Approve-SPOTenantServicePrincipalPermissionRequest : An OAuth permission with the scope
api://<CLIENT ID>/EUM_API could not be found.
Parameter name: scope

I have validated that the scope I'm requesting exists in the same Azure AD as my SharePoint Online.

rmunasinghe avatar Jan 31 '23 16:01 rmunasinghe

We have identified the cause of the issue and working on the plan of the fix. Thank you all for the information.

Will update the thread once we have better ETA.

AJIXuMuK avatar Jan 31 '23 22:01 AJIXuMuK

@Tanddant - the page should be fixed. Could you please confirm?

AJIXuMuK avatar Feb 01 '23 02:02 AJIXuMuK

The request now appears as approved - but I had manually added it through the Azure AD, will confirm approving actually works once I get to the office

Tanddant avatar Feb 01 '23 04:02 Tanddant

@AJIXuMuK - Confirmed resolved on several tenants - thanks for the quick resolution ๐Ÿ‘

Tanddant avatar Feb 01 '23 06:02 Tanddant

I also can confirm it is solved, we have raised last evening parallel Premier support case for it. Thanks

funzel1 avatar Feb 01 '23 07:02 funzel1

Huge thanks for everyone for your engagement here. Input and reports provided through this issue helped to solve the unexpected situation as fast as possible. Thank you and sorry for the inconvenience and challenges this issue might have caused for you ๐Ÿ‘๐Ÿ‘๐Ÿงก

VesaJuvonen avatar Feb 01 '23 13:02 VesaJuvonen

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

ghost avatar Feb 08 '23 18:02 ghost