Exact same situation here:
I'm moving my solution from .net6 to .net8, consisting of 2 projects: API - Azure functions, and Client - Blazor Wasm.
After moving, I lost access to the ClaimsPrincipal on the Function side(it's always null). I've implemented the middleware solution described here: https://adamstorr.co.uk/blog/using-azure-functions-middleware-to-access-claimsprincipal-in-azure-static-web-apps/
On the client side, I'm using the Refit library: https://github.com/reactiveui/refit. Haven't changed anything in how I'm calling Azure functions from the client side.
Previously, I was checking roles found inside the Azure portal - static web app - Role management.
After moving to .net8 - now using Microsoft Entra - App registrations - App itself - App roles.
And users: Enterprise Application - App itself - Users and groups
But nothing works out. If on a client side I successfully log in and check roles, when I call Azure function, there are no headers in "x-ms-client-principal" request.
Do I need to somehow pass something from the client side request?
What should I tweak more?
Nothing was found in the official documentation.