There was a mismatch between the Function app name in the msal
config vs the actual Function App name; and the issue was resolved in the following thread: https://learn.microsoft.com/en-us/answers/questions/1339396/does-the-azure-function-coding-language-matter-for
Azure Function Configuration for B2C SPA APIM Tutorial
I am following a Microsoft tutorial for integrating B2C with a single-page application (SPA) in Azure API Management (APIM). However, as a beginner, I am encountering issues with integrating Azure Function with my API while configuring authentication settings.
Whenever I run a test with identity provider-based authentication settings in Azure Function, it returns a 500 Internal Server error, and the SPA returns the same error once I try to call the API. On the other hand, when I remove the authentication settings from Azure Function, it returns the desired message when running a test on the Azure Function itself. However, when I try calling the Azure Function through the Call API button on the SPA, I receive a 400 error.
I'm unsure what the issue is, but I suspect it has to do with Azure Function authentication. Could someone guide me on how to fix this?
Edit: Also I was wondering if maybe there are some permissions in the tokens that might be causing this issue? For example, maybe the account I'm using doesn't have the permissions to access the API?
-
Mike Urnun 9,856 Reputation points Microsoft Employee
2023-08-07T15:46:26.1166667+00:00