Forum Discussion
Add app to team after it was added to personal scope
Hi,
Our app needs teams scope without which it is useless. However personal scope is also needed to show installation steps and then show some stats in tabs. So in app store our app provides two options: "Add" and "Add to a team".
(NB: I use Node JS Botbuilder SDK)
When added to a team, the installation flow is more or less clear: onInstallationUpdateAdd checks if
- dmsaprykin - These are the ideal scenarios and yes, we need to handle the bot installation event and need to check the condition for conversation type = "Personal" or "Team" and take a decision to send the card in personal or Teams scope accordingly.
- ChetanSharma-msftMicrosoft
dmsaprykin - In ideal scenario, if we add "personal" scope for your app/bot in manifest, so while installing the bot it will show "Add" button and on click on it, it always install the app/bot in personal scope.
If you want to install the bot/tab in teams channel, we should add scope as 'team' in manifest & while installing the bot/tab, it will show you the "Add To Team" button with channel selection.
Also, scopes are different for different capability like:staticTabs => Currently, static tabs support only the
personal
scope, which means it can be provisioned only as part of the personal experience.
Manifest schema reference - Teams | Microsoft Docsbots => Specifies whether the bot offers an experience in the context of a channel in a
team
, in a group chat (groupchat
), or an experience scoped to an individual user alone (personal
). These options are non-exclusive.
Manifest schema reference - Teams | Microsoft DocsconfigurableTabs => Currently, configurable tabs support only the
team
andgroupchat
scopes.
Manifest schema reference - Teams | Microsoft DocsThanks,
Chetan Sharma
---------------------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.
- dmsaprykinCopper ContributorThank you Chetan,
That's the problem, I need static tabs and teams/personal bot. Personal bot more for welcoming user and onboarding experience. So either Add or Add to teams can be clicked, but since our bot doesn't make sense without a team, I have to proactively install (if not installed previously) to a team user selects during onboarding chat. And I wonder if that's acceptable solution.
Main issue is when user clicks Add to team, I receive two installation events, personal first and channel second. In that case I send user a message — you're all set, bot is team A, channel B. But if Add button is clicked, I receive only one event and need to set some kind of timeout when I check if bot is not in the team so I send different onboarding flow.
Just trying to understand that that's the only option for my scenario.- ChetanSharma-msftMicrosoftdmsaprykin - These are the ideal scenarios and yes, we need to handle the bot installation event and need to check the condition for conversation type = "Personal" or "Team" and take a decision to send the card in personal or Teams scope accordingly.