Reputation: 27
We have implemented authentication as specified in the C# Teams Sample.Once the access_token
expires we have to re-prompt the user to login.
Currently, the access_token
expires in 1 hour.
Scopes:
https://graph.microsoft.com/User.Read
openid
Mail.Send
Sites.Read.All
When we request refresh token per the documentation, it gives an access denied
error.
Is there a way to refresh the token instead of prompting the user to login again?
Upvotes: 0
Views: 484
Reputation: 319
If you are using implicit grant after the token has been expired you should login again there will be no other option to get the access token.
If you use code grant then you will get RefreshToken along with AccessToken you can update get the new AccessToken using the RefreshToken. Please follow the link for Code grant implementation
Upvotes: 1