I need to call custom web APIs secured with Azure AD from my SharePoint 2019 on-premise SharePoint Framework solutions. As far as I know, this scenario and calling graph APIs are only supported in SharePoint Online.
I was following the article. It has mentioned to add
webApiPermissionRequests key in package-solution.js. But, after adding the webApiPermissionRequests key, package failed to deploy in app catalog with error "Error in the application".