You failed due to browser security feature,see this doc
You could follow this document :Sign in users in a single-page app (SPA) and call the Microsoft Graph API using Blazor WebAssembly