1

I have a query regarding, How to Proactively Install / Push Apps in Teams for Multiple Users ?.

We have added our Bot Application as part of Teams App Catalogue, and I followed below document regarding Manage App Setup Policies in Microsoft Teams to install apps: https://learn.microsoft.com/en-US/microsoftteams/teams-app-setup-policies?WT.mc_id=TeamsAdminCenterCSH#install-apps

Though above link clearly states that it automatically installs apps for users, but when we follow above link it only adds application as part of Teams App Catalogue. So just wanted to know that does installation here mean, only adding in App List and not installing as such on user machine ?.

The other method we can follow is to create a custom script and use Graph API queries as described in below link: https://learn.microsoft.com/en-us/microsoftteams/platform/graph-api/proactive-bots-and-messages/graph-proactive-bots-and-messages#proactive-app-installation-in-teams

So wanted to know as per Microsoft, what is the recommended way of Pushing Bot App to multiple users on MS Teams. Can this be handled with Teams Admin Center ?.

Any help or guidance on the approach to achieve proactive app installation in Teams would be great.

Thanks In Advance!!!..

Siddharth
  • 436
  • 2
  • 11
  • 29

2 Answers2

1

Both of these approaches should work fine. App Setup Policies is the easiest though as you don't need to write any code, but be aware that it can take a while for the policy to apply (I think up to a day or even two). There's a way to force it to update, I think if the user signs out of Teams entirely and signs back in.

Hilton Giesenow
  • 9,809
  • 2
  • 10
  • 24
  • Hey thanks for the answer. I have tried the App Setup Policies way, and it just side loaded the App for me and not install as such. Are you trying to say I should wait for the policy to get applied and then check on user machine whether the Bot App has automatically installed successfully?. – Siddharth Sep 01 '21 at 04:31
  • The app should appear in the left menu for the user. It might be hidden behind the "..." menu, but it should be there. Your bot should also receive an conversationUpdate event, which is really the main thing you want for the proactive messaging – Hilton Giesenow Sep 01 '21 at 06:25
  • Hey thanks again for the revert. I just wanted to share my observation here. Maybe the App Setup Policies do work. I waited for 1-2 days and logged in as a new user, and I saw my Bot conversation. So the question arises if the policy takes a day or two to apply, does the user need to logout and login again ? or it automatically gets added in the left menu with the user still logged in? – Siddharth Sep 02 '21 at 10:07
  • ok great, glad to hear it came right. I'm not sure if there's an "official" response on this from Microsoft, but I've seen it vary anywhere from minutes to days. However, as you noticed, it's definitely faster if the user signs out and then signs in - that seems to 'force' it to get the new policy. – Hilton Giesenow Sep 02 '21 at 14:37
  • I signed out and in after 1 day, and it still did not show me the App, so I am waiting for one more day to check. Also with regards to Sign out and Sign In, is that we don't want to enforce it on all Teams Users, the idea is to do a Silent Installation, and not involve user to take Action. My query on login-logout was to check whether it is a mandatory step for the user, in order to see the App in side bar or no ? – Siddharth Sep 03 '21 at 06:37
  • If its showing for one user, I think you have assigned that policy to other users too. If not you need to assign this policy to the users. See this - [Assign a custom app setup policy to users](https://learn.microsoft.com/en-US/microsoftteams/assign-policies-users-and-groups) It took some time to reflect but it worked for me. – Hunaid Hanfee-MSFT Sep 06 '21 at 17:28
  • Also if I re-publish the app, by updating the Manifest file through Admin Center, will it take same time for app to be updated, or it will be instant now ? Also which Bot event would get fired, once the App has been Updated via Manifest Files and re-published via Admin Center?. – Siddharth Sep 09 '21 at 04:24
  • I think this might depend on the type of app, but it's up to the user to choose to install the update (they'll get a message in Teams requesting that they update the app). Try it out and see. In terms of your bot, you won't get any event fired on update of the manifest at all. – Hilton Giesenow Sep 09 '21 at 05:57
  • Ok.. because when I checked the below link it has application upgrade events: https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/conversations/subscribe-to-conversation-events?tabs=dotnet#installation-update-event So when does the "installationUpdate" event get fired ? Also any way to trigger an event on the Bot, if we update the application ? – Siddharth Sep 09 '21 at 07:00
  • So I haven't tested this, I could be wrong, but according to the doc, you need to `upgrade an application, and then **add or remove** a bot,` - just the upgrade won't trigger any notification. Also this only seems to apply to a 'conversation', which is probably a group chat or channel in a Team, not necessarily a 1-1 bot. Like I said, haven't tested it, but my suspicion is you won't get notified for a 1-1 bot update just from the manifest changing. If you find out more either way, please do let me know. – Hilton Giesenow Sep 09 '21 at 09:25
0

I tried with Teams Admin Center and tested 2 scenarios:

1.) For User Already Logged In

2.) For New User Logging the First Time

The policies take time to be applied / be effective for users (not immediate). In my testing, I logged in after ~2 hours for New User and waited ~2 days for already logged in User. We have to test the same for your respective environment. Also these are not Standard Timelines, and we have Test in our environment accordingly.

Siddharth
  • 436
  • 2
  • 11
  • 29