Error deploying SPFx Library component solution package with webApiPermissionRequests

Sushrut Paranjape 61 Reputation points
2022-02-15T17:28:23.86+00:00

Hello,

I am using SharePoint Office 365 where I have developed a reusable SPFx library component using React. The solution also has "webApiPermissionRequests" which requests a scope in below manner:

"webApiPermissionRequests": [

  { 

    "resource": "Test Integration", 

    "scope": "access_as_user" 

  } 

]

I was able to deploy this library component to my dev tenant without any issue. But when I tried deploying the same on test tenant, I am getting error as "Deployment failed" with correlation ID.

So I tried removing "webApiPermissionRequests" and then deployed the solution. Then I am able to deploy the package successfully.

I don't have tenant or SharePoint Admin access on the tenant where I am getting error.

Is this issue related to permission or something else?

Thank you!

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,728 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,685 questions
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 31,606 Reputation points Microsoft Vendor
    2022-02-16T06:57:50.883+00:00

    Hi @Sushrut Paranjape ,
    You can try to deploy spfx with webApiPermissionRequests again first. This error is usually found when the App catalog is newly created and app is added immediately after App Catalog creation. Just remove the app and wait for about 30 minutes and deploy again. If this doesn't work. You can try to removed "isDomainIsolated": true, from the package-solution.json file. This also might cause the error. If all above doesn't work, you might need to grant tenant with Sharepoint Admin permission to fix this.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.