Search code examples
botframeworkmicrosoft-teams

Deploy 1:1 Teams bot to all users at once


I would like to deploy my 1:1 Teams bot to all users in an O365 tenant as a company admin. How do I do that? I know how to get a Manifest in the Org's app store but it seems I can only deploy it for myself. For obvious reasons I can't expect my 2.000+ users to do that.

I know there is a previous question about this (Microsoft Teams: How to provide a 1:1 chat bot globally?) but it seems outdated and I don't see a real solution here


Solution

  • I can think of a fairly simple way to do it assuming some programming, of course.

    Use the MSFT Graph API to add the contact to the user's contact List, then it'll show on the 1:1 chat tab.

    https://learn.microsoft.com/en-us/graph/api/user-post-contacts?view=graph-rest-1.0&tabs=cs

    Since it is a user's contact it also allows to set a picture and a custom name.

    EDIT:

    I then realised this would not list in the 1:1 chat tab because it wouldn't appear there until there is an interaction. Also not sure how the contact should be populated...

    My suggestion would that from the bot itself you sent a welcome message to every user, this will make sure that everyone has in in 1:1.