Microsoft Teams is a communication and collaboration platform that combines workplace chat, video meetings, file storage, and application integration.
This integration will let you connect your yellow messenger bot with Microsoft Team Channel. Using Azure bot service you can create bot and connect with different channels including MS Team. The message that users send can be received at YM configured endpoint and YM bot would be able to reply to the conversation on both Personal chat or channels on MS Team.
How does an MS Teams app integrate with YM?
For Integrating Yellow Messenger MS Team channel, you will need to create a new azure bot service for which you will receive Client ID, Client Secret.
Note: You can not perform these actions if you don't have access to YM azure portal. Please reach out to Syed Parvez or Rashid Khan to create a bot service for you. You can also do it using a trial azure account with your email ID if you’re just trying things out.
Steps to create a bot service :
Step 1: Goto https://portal.azure.com/ then Search for Bot Services and click on Add Button.
Step 2: Select the Bot Channel Registration and Click on the Create button.
Step 3: Fill the form according to the below image.
Bot Handle: Set a unique bot identifier Subscription: Create new if haven’t created earlier. Resource Group: Create new if haven’t created earlier. Messaging endpoint: https://app.yellowmessenger.com/integrations/botframework/[botID] Microsoft App ID and Password: Auto create.
Step 4: After successfully deployment of Bot Service, Go to Azure Home > App Registrations and select your created App.
Save the Application/Client ID and tenant ID for future use and go to Certificates & Secrets
Step 5: Click on the New client secret > Fill the description & select expires to Never, After clicking on Add button a Client Secret will be generated, save the value of the Client Secret for future use.
Adding Redirect URL Goto Authentication > Add a platform > Web > Add the redirect url > Save Redirect-Url: https://app.yellowmessenger.com/integrations/azureauth/
Add / Remove permission and Grant Admin consent for the App Goto API Permissions > Add the required permissions
Step 6: Now go back to Bot Services and select your Bot service from the list and click on the Channels option.
Add the MS Team channel using Add a featured channel, then click on the Microsoft Teams (with Running health) and open it using Web or Window App.
You will find your bot added in the MS Team chat and can start interacting after the next step.
Go to yellow messenger MS Team channel and fill those Client ID and Client Secret, now you are ready to use MS team with Yellow Messenger bot. Test by sending a message using app.sendTextMessage() .
Add App Studio from App Store which allows you to create bot manifest, Command Suggestions, Message Extensions, publishing your app etc.
For creating a new App in App Studio: Click on the Create a new App and fill the app details, enter client ID in App ID field. Connect your app studio bot with azure bot services by configuring Client ID in the Bots Section, For Testing: Install bot using Test & Distribute Section.
App Registration on Azure AD: Click here. Connecting YM bot to MS Teams : Please follow Section 'Getting Started' from above for Team Integration.
How to set dynamic scopes in Login url:
Add / Remove permission and Grant Admin consent for the App, Goto Azure Portal > App Registration > API Permissions
For enabling multi tenant: Enable multi tenant in the Azure AD integration in Yellow messenger and enable multi tenant on the App registration > Authentication
Graph APIs: Documentation: https://docs.microsoft.com/en-US/graph/api/overview?view=graph-rest-1.0
Note: For APIs that require Admin consent, Admin can consent for their organisation via Azure Portal or at the time of Login itself.
Adaptive Cards are an open card exchange format enabling developers to exchange UI content in a common and consistent way.
Designer functionality: https://adaptivecards.io/explorer/AdaptiveCard.html
Sending Adaptive Card using yellow messenger:
Receiving Form Submission data from Adaptive Card in YM bot:
Step 1: Goto App Studio > Select your App > Bots > Setup your bot using Client ID and click on the Add button in the Commands section to add suggestion commands.
Step 2: Fill the new command fields > Click on Save. You would find Bot suggesting you the commands after reinstalling the app.
Messaging extensions allow users to interact with your web service through buttons and forms in the Microsoft Teams client. They can search, or initiate actions, in an external system from the compose message area, the command box, or directly from a message
Steps to integrate ME with Yellow Messenger:
Step 1: Goto App Studio > Select your App > Messaging extensions > Set up
Step 2: Configure your bot and change messaging endpoint to: https://app.yellowmessenger.com/integrations/sync/microsoft/extensions/[botID]
Step 3: Click on Add Button and choose method according to the requirement then fill out the details and parameters for your message extensions.
Action Type: Allows you to open a pop up and take multiple field values. (e.g: Add Task) Query Type: Allows you to run a query in the search field itself. (e.g: Wikipedia Search)
Receiving responses in yellow messenger:
Note: For initial run or empty query , app.data.value.parameters.name = "initialRun"
Action Type Submission:
Responding to the Message Extensions:
To run Message extension from Search bar, @mention the bot (example @Bumblebee) and select your bot from suggestion.
After clicking on the preview user can view the Adaptive Card attached with the preview.
Create TM using Deeplink:
Group Conversation: (Teams / Channel)
The bot must be @mentioned. Your bot will not receive a message when the team or channel is mentioned, or when someone replies to a message from your bot without @mentioning it.
Adding a bot in a team or channel: Goto channel and click on the + button with the tabs
For published bot: you can add using the search. For development bot:
- Goto App studio and download the bot that you want to add in the teams.
- Click on the Manage apps and then Upload a custom app from the bottom-right.
- Upload the downloaded .zip of the app.
- Try to learn as much about Teams apps as you can. Try to install different apps and observe the workflow and user experience.
- Learn basics of MS Teams
- MS Teams UI elements
- Learn about bots, tabs, message extensions
- Learn about adaptive cards
- Learn about Active Directory authentication