MS Teams: refresh_token not coming from OAuhCard in AAD v2 #3814
Description
What project is affected?
Virtual Assistant with botbuilder version 4.11.0
What language is this in?
Typescript
What happens?
We are enabling the MS teams channel for our bot (already enabled Directline channel which is up & running).
We have tried the below samples but those are not helpful.
https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-conversation-sso-quickstart
https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-sso/nodejs
We are configured OAuth setting as AAD with scopes are openid profile api://botid-[client_id]/access_as_user at BOT service and when we try testing the connection we are able to get the access_token but not getting the refresh_token.
We have even tested the existing access_token to see whether it's getting refreshed automatically or not. But it's getting expired.
What are the steps to reproduce this issue?
Create the virtual assistant by the following the URL,
manifest.json file is
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.9/MicrosoftTeams.schema.json",
"manifestVersion": "1.9",
"version": "1.0.0",
"showLoadingIndicator": true,
"isFullScreen": true,
"id": "aa186c9e-f7a1-4c43-b68e-22988a3f871b",
"packageName": "com.microsoft.teams.eva-it-dev",
"developer": {
"name": "Ecolab",
"websiteUrl": "https://www.xxxx.com",
"privacyUrl": "https://www.xxxx.com/epp",
"termsOfUseUrl": "https://www.xxxx.com/terms-of-use"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "DEV-TEST",
"full": "TEST"
},
"description": {
"short": "TEST",
"full": "Teams"
},
"accentColor": "#FFFFFF",
"staticTabs": [
{
"entityId": "conversations",
"scopes": [
"personal"
]
},
{
"entityId": "about",
"scopes": [
"personal"
]
},
{
"entityId": "com.contoso.teamsauthsample.static",
"name": "Auth Tab",
"contentUrl": "https://0e9efa6a1a73.ngrok.io/api/healthcheck",
"scopes": [
"personal"
]
}
],
"bots": [
{
"botId": "XXXX-3cac-4c8d-bd6b-XXXX",
"scopes": [
"personal"
],
"supportsFiles": false,
"isNotificationOnly": false
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"en-in.xxxx.com",
"www.xxxxx.com",
"dev.xx.xxx.com",
"token.botframework.com",
"*.ngrok.io"
],
"webApplicationInfo": {
"id": "XXXX-50f6-4d38-9ec0-XXXX",
"resource": "api://0e9efa6a1a73.ngrok.io/XXX-50f6-4d38-9ec0-XXXXX"
}
}
What were you expecting to happen?
We are expecting the refresh_token in OAuthCard response.