Does a bot get notified when it's uninstalled from a tenant? - microsoft-teams

I'm testing out a bot right now via an uploaded custom (sideloaded) app. I can see that when I add the bot to a team or remove it from a team that I get an activity with a type of conversationUpdate with the bot's ID in the members added or members removed element.
Is there a specific activity or other event that the bot gets when it's removed from the tenant entirely? Do I just have to track all teams the bot was added to?

Teams does not yet have a well-defined concept of being added at the tenant level. We will be adding that in the first half of 2018.
In the meantime, yes, you have to track it on a team-by-team basis I'm afraid.

Related

Create an MS Teams app that is always added to all meetings

I want to create an app for Microsoft Teams that, after installed and approved by the user, is always 'added' to all meetings and group conversations. Is that possible? The documentation from Microsoft is not clear about it.
The app is meant to get notifications from the meeting - someone has joined, recording has started, meeting has ended, etc.
Currently, We are adding the custom teams app manually.
Ref doc :-https://github.com/MicrosoftDocs/msteams-docs/blob/main/msteams-platform/apps-in-teams-meetings/enable-and-configure-your-app-for-teams-meetings.md
We do not have API to add the app to all meetings.
At the moment, it has to be a two step process. First, create the meeting using Graph and then add the app to the meeting using Graph.
Could you please raise a user voice here for new requirement:
https://microsoftteams.uservoice.com/forums/555103-public/filters/new

Microsoft Teams App added or removed from personal scope events missing

I try to write an app for Microsoft Teams which does include a Bot.
The bot should write a welcome message as soon as the app is installed by the user in his personal scope. Additionally I want to be informed when the user uninstalled an app.
There are events when a new user is added/removed to a team (onTeamsMemberAdded/onTeamsMemberRemoved) in which the bot is installed, but is there also something for the personal scope?
onTeamsMemberAdded should deal with personal scope as well, and it will enable you to send a welcome message. However, there is unfortunately no way to get notified when your bot is removed. onTeamsMemberRemoved only applies when your bot is part of a group chat, or channel, and only tells if other users have been removed. This is a missing feature in Teams right now.

Is there any way to get user details whenever user uninstalls bot and bot is installed in personal scope only?

This is conversationUpdate event with membersRemoved object but that works only in the case when the bot is installed in a group and either the bot or member is removed from the group but I don't receive any callback when the bot is installed in personal scope and is removed later.
Unfortunately, there's no event/information sent on this at all from Teams. There's a new event in the bot framework (latest release) called "InstallationUpdate", which I was hoping would cover this, but that also doesn't send anything, at least not at the moment.

Bot not available for 1 on 1 chat in MS Teams

I am testing a chat bot (built using MS bot framework) in MS teams. The bot is designed for one on one chat but I want to make it available to a group of testers. As such, I've created a team and added the testers as members and the bot as an app. According to the MS documentation my understanding was that if the bot manifest included 'personal' in the scope then any team member should be able to start one on one chat with the bot. However, when searching for the bot in the "to" field of the Chat window some team member can find the bot and others can't. My first thought was that there was delay between when a person was added to the team and when they could access the bot in a one on one chat. But that doesn't seem to be the case. Is there something else I've overlooked that would prevent the bot from showing up for some team members but not others?
#Moe Adding the Bot to a team does not make the bot available to all the members of the team in personal scope. It is still in the teams scope and all the team members will be able to access the bot in the team only. A member of the team should either install the app in personal scope or click on the chat icon by hovering on the bot name in team and click on "Add"
#Gousia-MSFT's answer got me part way to a solution. When hovering over the bot's icon in the Teams chat I didn't get an option to 'add' the bot. However, there was an option to 'chat' with the bot:
. Using the text box or clicking the chat icon starts (or continues) a one on one conversation with the bot.

Teams SDK events - determine if Team has been deleted

I have a fairly basic Teams app I've been developing, that has a bot associated with it. The bot is a simple NodeJS application, that us just waiting on events sent by my teams app to it
I see the teams conversationUpdate Type and some associated eventType in the SDK docs.
Is there an easy way to detect if the actual Team itself has been deleted?
i.e I have a Team, I add my app to it and create a tab in the team for the app. I can detect that the app has been added to the team, by checking the teamMemberAdded eventType.
But, I'm unsure if i can use the teamMemberRemoved eventType to determine if the Team has been deleted
Thanks
Currently, Bots do not receive an event when its containing team is deleted.
If you are storing team and channel details for proactive messages then you can clean it up when you get "NotFound" error code in exception while sending a message.

Resources