Refresh token implementation in .Net

Kirankumar Jayakumar 21 Reputation points
2022-08-30T10:21:10.893+00:00

My .Net application is using Azure AD authentication (implicit flow). After some time the user is getting logged out, I believe its because token is getting expired. I have seen that AppServiceAuthSession gets deleted after some time (7.5 hrs) and after that user is logged out if he performs any action( gets 403 error). I have read that using refresh token this issue could be resolved, but I could not find implementation in .Net.
Could someone please share sample implementation.

Thank you in advance.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,794 questions
0 comments No comments
{count} votes

Accepted answer
  1. 2022-08-31T19:32:11.507+00:00

    Hello @Kirankumar Jayakumar and thanks for reaching out. Azure AD refresh tokens are requested and obtained together with access tokens using the OAuth 2.0 authorization code flow but not the implicit flow. Look for the samples that support the former and match your language/platform in Microsoft identity platform code samples.

    Let us know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.


0 additional answers

Sort by: Most helpful