Error: Unable to access application API - Deploy to Azure
ievsantillan opened this issue · 1 comments
I've ensured the step 7 is completed. I can confirm that these values are correct as my App starts up fine locally.
Myself who is not familiar with Azure Functions, the next step to fix and resolve this issue is unclear. Kindly assist.
Due to the two methods of [API support in Azure Static Web Apps with Azure Functions](https://docs.microsoft.com/en-us/azure/static-web-apps/apis), you need to manually create an Azure Function for the /api/AadToken endpoint. For more information, please follow the [Getting started with Azure Functions](https://docs.microsoft.com/en-us/azure/azure-functions/functions-get-started?pivots=programming-language-javascript) and learn how to [Bring your own functions to Azure Static Web Apps](https://docs.microsoft.com/en-us/azure/static-web-apps/functions-bring-your-own).
API support in Azure Static Web Apps with Azure Functions has a table that contrasts the differences between using managed and existing functions. Note that Azure App Service Authentication and Authorization
is not one of the managed functions and requires you to bring your own functions to Azure Static Web Apps.
Specifically, the api/AadToken function needs to be recreated as a standalone Azure Function with the associated environment variables defined.