I apologize in advance for adding yet another question related to this issue. I've carefully reviewed all of the Microsoft docs, as well as questions on Stack Overflow and GitHub, but still cannot resolve this issue.
I'm creating a Blazor Server application (.NET 5) that authenticates and authorizes users using Azure AD and Microsoft Graph. I've been able to implement this perfectly when testing on my local machine. Once deployed on Azure, the app will authenticate the user, but when I attempt to access a page that requires authorization I received the following error:
Error: Status Code: Unauthorized Microsoft.Graph.ServiceException: Code: InvalidAuthenticationToken Message: CompactToken parsing failed with error code : 80049217
I created the app with the default authorization using Microsoft Identity Platform and have changed little to the 'Startup.cs' file. Based on the information I've been able to gather it seems like this error is produced when an invalid Access Token is provided in the HTTP header when calling the Graph API. I've tried countless times to fix this issue according to various solutions others have used but without avail.
I'm unable to provide a link to the source code because this is a proprietary app, however I can provide some small generic samples if needed.
I'm hoping that there's some fellow Blazor developers who might be able to graciously provide some breadcrumbs for me to follow on this.