Forum Discussion
How to Open a Configuration Tab or Dialog When Clicking ‘Setup’ During App Installation on a Team
DSRA2115 - Thanks for reporting your issue.
You can use the microsoftTeams.tasks.startTask method to open a dialog box directly when the user clicks the "Setup" button during installation. This method allows you to specify the URL of the external sign-up page and open it in a dialog box.
Example of how to use microsoftTeams.tasks.startTask:
microsoftTeams.tasks.startTask({
title: "Sign Up",
height: 500,
width: 800,
url: "URL"
});
Ref Doc: Invoke Dialogs from Tab, Bot, or Link - Teams | Microsoft Learn
I want to know how to use the startTask property in that case/
- Nivedipa-MSFTOct 16, 2024
Microsoft
DSRA2115 - The startTask function is from the Microsoft TeamsJS library. We are investigating for Golang language and for the sdk https://github.com/infracloudio/msbotbuilder-go.
We will update you soon.- DSRA2115Oct 17, 2024Copper Contributor
Sure, Nivedipa-MSFT
Basically, after discussion with my team, we only want the application to get configured as 'Set Up as bot' without a configurable tab (as we are not providing any useful feature in it, and only using it for permission and authentication flow) but we want to display a dialog box to request for permissions and handle third-party authentication.Currently, I’m trying to implement this from the backend using Golang by handling the “add InstallationUpdate” webhook event with an event listener. Ideally, I would like to open the dialog box directly from the backend, if that’s possible.
However, if it can only be done from the frontend, please let me know. The challenge is that we can't initialize Microsoft Teams JavaScript until only a configurable tab is opened (& our emdedded frontend link gets hit) and after the 'Set Up' button. Our goal is to open a dialog box, not a configurable tab, for requesting permissions and third-party authentication.- Nivedipa-MSFTOct 18, 2024
Microsoft
DSRA2115 -
From your company Configuration as 'Set Up as bot' without a configurable tab: This approach is feasible. You can configure your bot without a tab by ensuring that your app manifest does not include any static or configurable tabs. This can be done by removing the "staticTabs" and "configurableTabs" sections from your manifest file.
Ref Doc: How to Create Channel/Group Tab - Teams | Microsoft Learn
Displaying a dialog box for permissions and third-party authentication: You can handle the "add InstallationUpdate" webhook event from the backend using Golang. However, opening a dialog box directly from the backend is not possible. The dialog box must be triggered from the frontend. You can achieve this by sending a proactive message from your backend to the user, which includes a deep link to open the dialog box.
Ref Doc: Publish Power Virtual Agents Chatbot - Teams | Microsoft Learn
Bots in Microsoft Teams can be configured to handle various tasks, including authentication and permissions. You can use the Bot Framework to create a bot that interacts with users and handles authentication flows. The Bot Framework SDK provides tools and libraries to help you build and manage your bot.
Ref Doc: Introduction to Bots in Teams Apps - Teams | Microsoft Learn
Building a Microsoft Teams Bot App: This guide provides a step-by-step process for setting up a bot app in Microsoft Teams, covering everything from app registration to deployment. It includes details on how to configure your bot and handle authentication.
While you can handle the "add InstallationUpdate" webhook event from the backend, the dialog box for permissions and third-party authentication must be triggered from the frontend. You can achieve this by sending a proactive message from your backend to the user, which includes a deep link to open the dialog box.