Error when approving the API Access

The requested permission isn't valid. Reject this request and contact the developer to fix the problem and redeploy the solution

  1. Open the SharePoint app catalog. Open the link https://{your-tenant-name}-admin.sharepoint.com/_layouts/15/online/ManageAppCatalog.aspx. Please replace “{your-tenant-name}” with the tenant’s name

  2. Click the Apps for SharePoint link in the left menu. In the Apps for SharePoint, select the app & click the Deploy button in the ribbon

  3. After completing uploading the package, a popup appears to confirm the deployment. Check the “Make this solution available to all sites in the organization” checkbox & click the deploy

  4. Consent to the app
  5. Back to the API Access page & approve the API again