To obtain a refresh token and use it to renew the access token for your bot implementing Entra Single Sign-On (SSO), you will need to follow the OAuth 2.0 flow.
- After user consent and successful authentication, besides the access token, you should receive a refresh token, which you can use to renew the access token later.
- Ensure that you securely store the refresh token. It's sensitive data and should be kept in a secure storage solution, like Azure Key Vault.
- When the access token expires, you can use the refresh token to acquire a new access token. This involves making a request to the authorization server.
Ref: https://learn.microsoft.com/en-us/entra/identity-platform/security-tokens
https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-client-creds-grant-flow
Thanks,
Prasad Das
*************************************************************************
If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.