Reputation: 987
I need a help to make a decision related to integrating Microsoft Graph API to integrate office 365 Calendar, that can be accessed at any time. So for this, I am going to follow the approach to store the Refresh_Token so that whenever I need to access calendar of users I can generate token using this refresh token.
Is it the correct approach to access an user calendar at anytime?
Pls share your views here.
Upvotes: 1
Views: 52
Reputation: 1138
Is it the correct approach to access an user calendar at anytime?
Yes, you are right. And we should refresh the accesstoken using the refresh token before it is expired.
Access tokens are short lived, and you must refresh them after they expire to continue accessing resources. You can do so by submitting another POST request to the /token endpoint, this time providing the refresh_token instead of the code.
For more detail, we can refer to this document
Upvotes: 3