Just a quick post on how to solve an issue where an Azure Static Web App with Blazor WASM and Entra ID sign-in causes a 404 not found when redirected back to authentication/login.

Essentially, in your Blazor WASM project you will have a web.config that should fix this, but is not compatible with Azure Static Web Apps:

To workaround this, simply place a staticwebapp.config.json file in your wwwroot folder with the following contents:
{
"navigationFallback": {
"rewrite": "/index.html"
}
}
This will cause all navigation to point to index.html and your Blazor WASM app.
awesome. thanks, this has helped with an unrelated issue. I was getting a 404 when hitting refresh on a blazor wasm app that had a route to a child page. ie.
https://bevutils.marcbeavan.com worked fine when F5’ing, but https://bevutils.marcbeavan.com/textutils resulted in a 404.
Adding the fallback config worked a treat!