I have a Blazor WebAssembly Standalone App that is configured to use authentication. This seems to work. I also have an Azure Function that requires authentication. When I log in to https://.azurewebsites.net/.auth/login/aad, everything works through the browser. However, I’m unsure how to perform authentication for the Azure Functions app through the Blazor WebAssembly Standalone App. I always get a 401.
I’ve tried posting the access token from the Blazor WebAssembly Standalone App to https://.azurewebsites.net/.auth/login/aad, but I get a 401. I’ve also tried including the access token in the Authorization header, as a Bearer token, when performing a get to the Azure Function, but I also get a 401.
This is a common scenario, no? Perhaps my Google and Copilot skills just aren’t up to snuff?