.Net Project Graph SDK Token is expiring when deployed to Azure App Service
Hi,
I'm struggling a bit with .Net development and getting stuck on my webapp after deploying it into Azure App service.
Basically the access token seems to be expiring after 1h and not refreshing and throwing me the error:
ODataError: Lifetime validation failed, the token is expired.
Currently I have a class called Invite.cshtml.cs that looks like this:
using
What I've noticed is that this call is not called from My Azure WebApp (but does run when I ran the app locally on my machine) which I assume is why the token never refreshes when I run my app:
public
The code blows up instantly on my OnPostAsync method as soon as it tries to load the graphServiceClient:
public
I honestly don't know what I'm missing in here so any help or guidance you can give me would be very appreciated. Thank you very much in Advance!
As an extra not sure if this helps but currently what I have on my Program.cs is the following:
var