SPFx App Not Showing API Requests to Azure Function in SharePoint Admin Center
Hi everyone,
I’m facing an issue where my SPFx web part needs to connect to an Azure Function to retrieve data, but the API access request for the Azure Function is not showing up in the SharePoint Admin Center under the API Access tab for approval.
Setup Overview:
Azure Function App with Managed Identity:
Enabled System-Assigned Managed Identity for the Azure Function to handle authentication without secrets in the SPFx web part.
Identity Provider Configuration:
Added Microsoft as the Identity Provider for the Azure Function and registered the function in Azure AD.
CORS Configuration:
Configured CORS in the Function App to allow requests from my SharePoint tenant.
SPFx Web Part Configuration:
Using AadHttpClient in the SPFx web part to make API calls to the Azure Function.In the config/package-solution.json, I included the webApiPermissionRequests for the Azure Function:
“webApiPermissionRequests”: [
{
“resource”: “AzureFunctionAppName”,
“scope”: “user_impersonation”
}
]
Permissions Approval:
After uploading the .sppkg file to the App Catalog, I expect to see the API access request in SharePoint Admin Center > API Access for approval, but no request is appearing.
Important Observation:
I have the same setup for another Azure Function (in a different subscription but the same tenant), and it’s working perfectly. The API access request for that function shows up in the SharePoint Admin Center, and I was able to approve it without issues.
What I’ve Tried:
Verified the Azure Function works independently by testing with Postman (using a Bearer token) and confirmed it responds correctly.Checked the SPFx web part successfully calls the Azure Function using AadHttpClient.Double-checked the App Catalog upload and deployment.Confirmed I am logged in as a SharePoint global admin with permission to approve API requests.
The Problem:
Despite the same setup working fine for a different Azure Function, I’m not seeing the API access request for this Azure Function in the SharePoint Admin Center.
Hi everyone,I’m facing an issue where my SPFx web part needs to connect to an Azure Function to retrieve data, but the API access request for the Azure Function is not showing up in the SharePoint Admin Center under the API Access tab for approval.Setup Overview:Azure Function App with Managed Identity:Enabled System-Assigned Managed Identity for the Azure Function to handle authentication without secrets in the SPFx web part.Identity Provider Configuration:Added Microsoft as the Identity Provider for the Azure Function and registered the function in Azure AD. CORS Configuration:Configured CORS in the Function App to allow requests from my SharePoint tenant.SPFx Web Part Configuration:Using AadHttpClient in the SPFx web part to make API calls to the Azure Function.In the config/package-solution.json, I included the webApiPermissionRequests for the Azure Function: “webApiPermissionRequests”: [
{
“resource”: “AzureFunctionAppName”,
“scope”: “user_impersonation”
}
] Permissions Approval:After uploading the .sppkg file to the App Catalog, I expect to see the API access request in SharePoint Admin Center > API Access for approval, but no request is appearing.Important Observation:I have the same setup for another Azure Function (in a different subscription but the same tenant), and it’s working perfectly. The API access request for that function shows up in the SharePoint Admin Center, and I was able to approve it without issues.What I’ve Tried:Verified the Azure Function works independently by testing with Postman (using a Bearer token) and confirmed it responds correctly.Checked the SPFx web part successfully calls the Azure Function using AadHttpClient.Double-checked the App Catalog upload and deployment.Confirmed I am logged in as a SharePoint global admin with permission to approve API requests.The Problem:Despite the same setup working fine for a different Azure Function, I’m not seeing the API access request for this Azure Function in the SharePoint Admin Center. Read More