Unable to access Azure Function from Azure Static Web App after linking

Matt Dorsey 151 Reputation points
2022-07-13T01:47:42.05+00:00

Hi, I was attempting to connect my Azure function to my Azure static web app by following this guide: https://learn.microsoft.com/en-us/azure/static-web-apps/functions-bring-your-own

I believe I followed all steps correctly, however, I am getting a 400 error whenever I try to query the function from my static web app! 220146-screen-shot-2022-07-12-at-80721-pm.png

Here are some more pictures that should confirm that I did everything correctly:

Linkage: 220174-screen-shot-2022-07-12-at-80649-pm.png
API Location set to "": 220183-screen-shot-2022-07-12-at-80632-pm.png
The authentication page for the function updated automatically after I linked to the function from the static app: 220223-screen-shot-2022-07-12-at-80702-pm.png
The function cors page allows for the static web app to access: 220224-screen-shot-2022-07-12-at-80834-pm.png

Why am I getting a 400 error? Also, I think it's important to note that if I remove the linkage the static web app is able to access the azure function.

Thanks!
Matt

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.