SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.25k stars 1.02k forks source link

Approving SharePoint API access permissions in admin center #9962

Open AlexFilipovici opened 1 month ago

AlexFilipovici commented 1 month ago

Target SharePoint environment

SharePoint Online

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

💥 SharePoint Framework

Developer environment

None

What browser(s) / client(s) have you tested

Additional environment details

No response

Describe the bug / error

When we try to approve a SharePoint API permission in the SharePoint admin center under "Pending requests" it seems that our request has been fulfilled. At first glance the approved permission moves to the"Approved requests" group in the UI. After refreshing the page we see that the requests are not visible anymore in the "Approved requests" group.

When we inspect the network traffic, while approving, we see that the Deny endpoint is called when approving: https://tenant-admin.sharepoint.com/_api/SPOInternalUseOnly.SPOWebAppServicePrincipal/PermissionRequests('GUID')/Deny

The SPFX functionality breaks as depicted below:

image

Steps to reproduce

  1. Go to https://tenant-admin.sharepoint.com/_layouts/15/online/AdminHome.aspx#/webApiPermissionManagement
  2. Click on a pending request and approve it
  3. Notice that the request has been visually approved and moved to the "Approved requests" group
  4. Refresh the page and notice that the approved request is not visible anymore

Expected behavior

Request should be approved instead of denied when approving it.