Problem statement: As a user I want to be able to share information quickly to MS teams from external web application.
For e.g. I am on an application and found some news that might be useful for the team so, I click on share and MS graph apis gets called that lists my teams and channels and I can select a channel to which I wish to share.
And I want this to be 2-way communication i.e. someone from my team can share something from MS Teams with be me that will be visible to me on the web application.
Now as a developer I wish to integrate MS Teams to my webapp such that when a user shares a news to teams, that message is posted by a bot on the teams channel.
And if someone #mentions the bot and provides some text then the bot sends that text to the external web app.
I am aware that this functionality can be achieved even without using a bot by creating webhooks.
But this approach is not viable for me as a outgoing webhook is created at a team level and not on app level according to documentation. So multiple teams will have multiple outgoing webhooks.
I believe this is possible by using bots or message extensions but I can't find a resource that tells how to build this and MS documentation is not very clear to me.
Related
I'm trying to send a notification out using Google Chats. But I have a few problems with the documentation I've been able to find:
It requires me to have a paid service account, which I do not have, and will not be getting
It requires using a chat bot, which (in my understanding) needs to be added to a room, and cannot just send out messages
Chat bots can't send out messages directly to personal accounts?
I'm already using Google OAuth2 authentication to access another Google API, so I'd like to use a Google API to send messages directly from the authenticated account. How would I do that?
So far:
All the documentation I can find is about making a chat bot.
I've considered some alternatives to sending out messages, but due to corporate device restrictions that will not be changing, google chats is my best option.
At the moment what you're trying to do is not possible, for multiple reasons.
You may know this already, but Google Chat is an upgrade to their old "Classic Hangouts" chat. In Google's own words, this is focused on enterprise (i.e. paid) accounts. While personal accounts are also able to upgrade and get some of the benefits, their documentation shows that Google Chat for personal accounts is very similar to the old Hangouts and most of the new features are meant for the paid accounts. This also includes the use of bots.
As you've observed, the Chat API currently only has methods to create and manage bots. There are no methods to send messages as your own account. This could be to prevent spam or because their Chat API is relatively new, since the Classic Hangouts did not have an API, and Chat hasn't fully replaced it yet. Even then, given that Chat is "enterprise-focused", it is uncertain whether or not personal accounts would get access to any new API features.
You could try to post feedback on their issue tracker or request the feature to see if you get a response, but for an immediate solution you may want to just use the Gmail API to send a regular email or reconsider the other alternatives that you had in mind.
Is there any way to send and receive messages asynchronously from a website to ms teams without bot intervention?
I have gone through Microsoft Graph API, there are some ms teams related APIs to read and send messages but those are synchronous apis.
Is there any way to implement socket programming or asynchronous APIs to send and receive?
Only available option to read chat messages via APIs is using Microsoft Teams Graph APIs.
Microsoft Teams app supports one or all of the following core capabilities:
Tabs
Messaging extensions
Bots
Webhooks and connectors
Please take a look at Understanding Teams app capabilities documentation for more details. Please feel free to add new comment on answer if you need more details.
We have a bot service running in MS Azure and a corresponding Teams app. This bot service is used by multiple customers. Requirement is to allow customers to change the bot name/icon that is shown in the Teams chat (please refer image below).
We can change the name and icon by changing it in the Teams App. However, this will require creating a separate Teams app for each customer. Is it possible to control this via the bot service code running in Azure? We want to do it programmatically based on logged-in user's domain. Is there anyway to do it?
Edit: Found a related post
Thanks
Vivek
This is not possible within a single bot - it's set at the level of the the bot registration, in Azure, and so can't be changed tenant by tenant in Teams, for example. You'd need to create a bot for every customer (tenant), or go with a generic name and image. You can of course customize the welcome message, responses from the bot, etc.
in Microsoft Teams we have a Team called "BD" and this team has a channel named "Global".
Now I have a ReactJS app with a NodeJS backend and I would like to
display all the messages that are written in the Global Channel of the Team "BD"
I only need to show which messages are written in the channel (so readonly would be sufficient).
What is the easiest way to achieve this ? Even an iFrame would be ok, if somehow possible.
Please take a look at List channel messages Graph API. First try these APIs in Graph Explorer.
To implement this in a code, you need to follow either Get access on behalf of a user or Get access without a user
Before calling this API with application permissions (access without a user), you must request access. For details, see Protected APIs in Microsoft Teams.
Im trying to make a custom bot in MS Teams.
My Admin has not yet enabled "Sideloading", but I have the option to "Create a Custom Bot", yet I cannot find any information between the differences of these 2 options?
Has the "Custom Bot" replaced sideloading? In which case, how can i connect my bot to my team? Its hosted on azure, but it kept saying "Sorry, there was a problem encountered with your request", when I had it set up using the Custom Bot.
The bot works perfectly, using both the emulator and the bot framework.
A custom bot is not a Bot Framework bot - it's really designed as a simple way to send information from Teams to an external application (Slack calls them "Outgoing Webhooks"). It's not designed for real bot conversations in the Bot Framework sense. The feature (and its limitations) are documented in detail here.
You can't use bots in a team without sideloading - that's what sideloading is for. When you sideload an app that contains a bot - more info here - it registers additional information needed for a bot to work in a team, as well as a record of the consent for that bot to operate in a team.