I have an application that I have to integrate with the outlook via Graph API. I need to retrieve the conversations which I am getting using the Graph Mail API. But the graph API is not able to return the object of the email in the form of threads(like that of a conversation thread between two email ids). Also, there is no field in the object that can specify to which thread a particular email belongs so that I can group them in my app.
Is there any way I can achieve the same.
Honestly, I think there is some severe lack of documentation on this everyday use case.
The solution it seems is to filter your messages by the conversationId.
See this answer: https://stackoverflow.com/a/63570384/2591194.
Related
It is really nice to have work with MS Graph API.
We are using this apis for our product.
Actually we need to get the All rooms of a User and assosiated events of the rooms.
We are able to fecth the rooms. but we are facing few issues with events.
Our requirnment for events is we have to fetch all the events w.r.t one room irrespective of who has created the events.
Currently we are getting the events which are created by me.
NOT GETTING EVNTS OF A ROOM CREATED BY OTHERS
FYI we are using auth flow with the below url
https://login.microsoftonline.com/tenatId/oauth2/v2.0/authorize?client_id=clientID&response_type=code&redirect_uri=redirectUrl&response_mode=query&scope=offline_access%20user.read%20mail.read%20places.read.all calendares.read&state=12345
and we are using below url to fetch the events
https://graph.microsoft.com/v1.0/me/calendarView/?select=id,subject,start,end,location,organizer,originalStartTimeZone&orderby=start/dateTime&filter =isCancelled eq false &top=100&endDateTime=endDateTime&startDateTime=startDateTime
Please let us know if there is any different api to fetch the rooms related all events with the token which we are getting with the above login flow.
We have checked all the documentaion but not getting expected data.
We can use the below API for the above requirement
https://graph.microsoft.com/v1.0/users/"room_email_id"/calendar/calendarView.
"room_email_id" should be replaced with the actual value
Thanking you
I'm building my first Teams app which will have two primary functions:
Proactively send a message to the channel (the bot is installed into) when a specific event occurs on my backend.
Members of the channel reacts to the message via actions.
I finally have a pretty good idea of how to set this up (I think) - but one part I'm missing is that in order to identify the specific app installation as belonging to one of my customers, I need to be able to allow the installing user to supply extra information like e.g. an API-key so that I can associate the specific channel with my specific customer.
Is there any way of doing this with a bot app? I've found examples for creating a configuration page, but they all seem to be associated with tab apps?
I could of cource have the bot ask the user for the information - but maybe there's a "cleaner" way?
Any examples or tutorials would be greatly appreciated as I find it rather hard to get stuff working using Microsoft's own examples etc. :)
Thanks a lot!
When you receive any message from the user, either by typing to your bot, or even installing it into a channel, group chat, or personal context (where you get the conversationUpdate event), you are able to get specific details off of the activity object. If the user sends a message, for instance, then the text property on the activity object will have a value. Incidentally, this is the same activity you will use to get the conversation details you need for the Proactive message.
With regards your question, the activity class also includes a tenantId property, hanging off the conversation property. This is the unique Microsoft 365 Id for the tenant, which would be what I'd suggest to uniquely identify them for your API, or licensing, or similar.
What I am trying to achieve -
When I call message API, it returns the group address to which mail is sent, I want to get the members of the group, And for that I believe I need group Id, so I am using the groups API mentioned below https://graph.microsoft.com/v1.0/groups
But this API returns an empty list to me.
Note: email I using is #outlook.com, not xyz.com.
The Microsoft graph API doesn't support personal accounts as you can see the below image. You should have a Work account to get the group details. You were able to get the messages because it supports personal accounts to read messages from your mailbox.
I created a slack app with distribution (multiple clients)
and I subscribe to events several events like a message posted in a channel.
Beside the team_id field for identifying the client team - is there an ability to put my own key for a client?
Thank you.
No, Sack does not store any custom data for you. Its your job as an app developer to store all team related information for your app and link it to the Slack team_id. This is usually done with a database.
You can however include custom IDs with Slack requests, e.g. in the response you get from an interactive message. See this answer for more details on how this works.
I'm designing an Outlook add-in and need to determine whether a selected message is part of a thread. Ideally, I'd also like to find related messages in said thread as well. Reading over the documentation, the conversationId property looks promising, though there doesn't seem to be a way to "get messages by conversationId."
Under the current version (1.4, non-preview) of the Outlook Add-in API, is it possible to detect that a message is part of a thread using the JavaScript API? Is it possible to then find other messages in the same thread?
ConversationId is part of the javascript API. This means that you can know the ConversationId for the Office.context.mailbox.item whose your add-in is focusing on. See documentation here
To my knowledge, there is no way to retrieve all mails for a given ConversationId using vanilla javascript and Office.js.
However, you may be interested in my answer here.
When something is not available with Office.js api for an Outlook
Add-in you can try to use the Exchange Web Services (EWS) or REST APIs to perform the action
You have basically two ways to request EWS from a mail add-in.
You can request directly the EWS with a SOAP request from your client
app. See method makeEwsRequestAsync in Office.context.mailbox(https://dev.outlook.com/reference/add-ins/Office.context.mailbox.html).
You can get an access token, send it to your server and make the request from
there.
For the specific case of retrieving conversations using the Outlook REST API, this answer may also be helpful.