I implemented authentication with Azure AD following this blogpost which seemed to work perfectly fine. I get a login dialog where I log in with an account from our Azure AD and it gives me an AuthenticationResult with an Accesstoken.
But when using the token I get a 401 from our Appservice and upon closer inspection, I find the ExpiresOn property(DateTimeOffset) of the AuthenticationResult contains the exact same date/time as when the token was requested.
I followed the exact steps described in the post, and checked all the settings in Azure but I'm unable to find anything related to the token expiration.
I'm hoping someone is able to help me on this as I'm at a loss.