Many of the new beta Microsoft Teams APIs, such as this require the caller to specify the unique ID of the group. Does anyone know how to find a given group's ID?
You can use the joinedTeams API to get all of the Teams that the current user belongs to. The response contains the group ID for each Team.
It looks like you want to use this group ID with the listThreads API. Note that this returns Outlook email conversation threads and not Teams chat threads. Currently, there is no API for reading Teams chat threads - I will update this answer when it arrives.
In the meantime, look at what the Microsoft Graph currently supports for Microsoft Teams. In summary, you can use most of the existing group APIs - for accessing the Team's roster, files, calendar etc. You can also (in Beta) create/read channels and create a new chat thread (you just can't read that thread yet, as above).
Related
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.
I need to get list of attendees of a MSTeams meeting call, and their times by an Azure Application.
For now, i've tried 3 different approaches without success:
Registering a Bot
Retrieve the attendee report of an event
callRecord subscription
In more detail:
Registering a Bot
MembersAdded event works as described in the documentation for v4.7 of the Bots SDK, ie. when a new user is added to a chat or a team, webhook is called, which does not work for online meetings. However for v3 of the Bots SDK there is a mention:
The conversationUpdate event with the membersAdded object in the
payload is sent when a user is added to a private scheduled meeting.
The event details will be sent even when anonymous users join the
meeting.
I've not tried this version of SDK, but i think it has the same behaviour as v4.7 because i don't see any request comming to my bot's webhook when an user joins a meeting.
Moreover, when i request Members of a meeting on message event to a bot by invoking:
var members = await TeamsInfo.GetMembersAsync(turnContext);
i get a list of team/chat members where a meeting is created but not the list of attendees of a meeting for the current time.
Retrieve the attendee report of an event
By this request, I can get the list of attenees, but only for live events.
However Teams clients (in preview mode now) can get this report for ordinary meeting with the full history of who/when entered/leaved a meeting with even guest names(!).
Anyway, this method has the following disadvantages:
As mentioned in the Get onlineMeeting and according to the Allow applications to access online meetings on behalf of a user, a Tenant administrator have to invoke PS command Grant-CsApplicationAccessPolicy for each meeting organiser, to grand my app permision to download this report
Administrators must create an application access policy and grant it to a user, authorizing the
app configured in the policy to retrieve an
online meeting on behalf of that user (user ID specified in the
request path).
Uses Beta version of the GraphAPI, so it can't be used in production
callRecord subscription
According to the Create subscription, i can subscribe to create and update events of a callRecord, and everything works well - when a meeting call is finished, my notification URL is called in 5-20 minutes, so i can find original meeting by callRecord.joinWebUrl and Get onlineMeeting:Example 3. Seems it's most suitable method for me, but has the following disadvantages:
Guests cannot be identified, their names as them passed in MSTeams clients are not reported to callRecord ie. callRecord.Participants[].AddtionalData["guest"].displayName == "Guest user" for any guest (seems like a bug), however entered/leaved information can be found by searching callRecord.Participants[].AddtionalData["guest"].id in callRecord.Sessions[].Segments[].Caller.Identity.AddtionalData["guest"].id
External users cannot be also indentified, callRecord.Participants[].User.DisplayName == "External user" for any external user, however i can retrive tenantId and userId, but still cannot get user's profile because my app has to have Directory.Read.All permision in that tenant, and it's not possible for every tenant.
PS. I can setup MSTeams to do not allow guests or external users, then it works partially well, because each user has to have Teams license assigned, and there is NO login page appears during joining a meeting, just an error page saying that meeting does not allow guest or external users, so the user should find a link to login to a tenant, which is not obvious in MSTeams Web Client, but possible.
PSS. In the Microsoft Teams admin center, i've checked the calling history of an organiser for a meeting with 1 guest, 1 tenant and 1 external and here it is:
Seems for guests, displayName is not stored at all, however for an external user there AAD email is stored (this is AAD guest user ie has '#EXT#' in his principal name, and has the same email as on the picture), however i'm not sure from where it resolved from by Azure - either from external tenant AAD or my tenant AAD for external user, because Azure has access to both.
So, maybe you know a method to get attendees and their times in a meeting call ?
Thank you for your suggestion/advice/reply !
Thanks for reaching us!
Teams by default generate attendees report and meeting report after completion of meeting call. We can able to see the list of attendees and the report. But at present we don't have any API to fetch list of attendees and their timings.
As this feature is not available at present, could you please raise an UserVoice if this needs to be consider as a future request.
Is there a way to send proactive cards from a bot to a Teams channel? The use case is a channel for service tickets. Once they get posted, a user will be able to interact with them with a few actions.
I’m looking at the documentation here for sending proactive messages. At the bottom, there’s a section for ”Creating channel conversations”, with a small reference to the startReplyChain(). However, the actual code and sample on GitHub still seem to reference a conversation with a member rather than sending something proactive to a channel.
There does appear to be documentation for incoming and outgoing webhooks, which is what I may end up doing. My only real concern is that it requires using Actionable Cards, which it references as legacy everywhere. This is despite saying that you can’t send Adaptive Cards with them. Perhaps they intend to enable these connectors to send Adaptive Cards, it’s not just very clear to me if this is a long-term solution I should be focusing on.
This is definitely possible, and it's important to note that you can even send from another process/application (e.g. on a schedule from an AWS Lamba). You can see a sample here for this.
The process of sending the message is just part of the story though - you need to have certain information already saved (e.g. in your database) to know how to contact the right user, group chat, or channel conversation, but there are a few ways to get that information. The most common is, when you bot is added to the conversation, to get it from the conversationUpdate event. You'll need conversation id, service url, tenant id, and your bot's App Id (what you get in the Azure portal for your bot, and which you're using already in your app's configuration, teams manifest, etc.). You can read more about the topic here and here.
Another option, if you don't have access to conversationUpdate (e.g. the user hasn't installed your app) is to call the Graph API to install your app. It's only possible to do this to a channel (on the v1 or beta api) (see here) or to a user (see here), but on the beta api only, and not (yet?) for a group chat.
We have an app that creates MS Graph Subscriptions where a user wishes to 'track' an outlook email conversation. The subscription uses the conversation id of the email to send notifications when an email within the conversation is sent or received.
Once we receive a notification from MS Graph, we then use the message id to get details about the email so we can store it in our CRM.
I am trying to find information on what the limitations/throttling are in regards to this.
I have read the info here and here but neither are very specific. I also raised a GitHub issue with the MS Graphs docs team here but they have not responded.
I really want to know:
Is there a limit for Outlook based Graph subscriptions per user?
Is there a limit to the number of messages that we can retrieve per user?
Is there a limit for Outlook based Graph subscriptions per user?
Yes there is limit. Each user or groupcan requests 10,000 API call in a 10 minute period. It could be same for user and group as
well. You could have a look official document
Is there a limit to the number of messages that we can retrieve per user?
Normally 500 message each user can retrieve but it is customizable. You can customize it up to 1000 for each user.
For more you could have a look official document here
Hope that would help. If you still have any concern feel free to share.
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.