I have an Azure Functions that I secured with Azure AD Authentication.
I am in a WPF app and I use the MSAL library to get a token. I am able to get a JWT token with a specific scope for my function from Microsoft authentication service. The token seems legit as I can open it in sites like https://jwt.io/. The info in the token seems good at first sight.
When I use the token to call the function I get a 401 - Unauthorized error.
My problem is that I have no idea what is wrong with my token.
How can I get more info from the 401 error in an Azure Functions? I couldn't find advanced logs anywhere.