Forum Discussion
aldenrmd
Oct 10, 2024Copper Contributor
Where to get the correct Message ID for the Graph API Parameter?
Hello, I need help.
I am using this API:
https://graph.microsoft.com/v1.0/me/messages/{id}/attachments
Where I get the message ID is from here:
But the response always fails, and I'm sure it has something to do with the validity or format of the message ID. Is there any way I can find the correct format of the message ID? Or is there any way I can find other ways to find the message ID in the UI of Outlook web?
1 Reply
Sort By
- What you are showing on the screenshot above is the "internet message ID", you cannot use that with Graph directly. Graph works with the REST identifier for the message, which you can get from via the LIST method. You can however do as search based on the internet message ID and find any matching messages:
GET https://graph.microsoft.com/v1.0/me/messages?$filter=internetMessageId eq '<email address removed for privacy reasons>'
Do note you have to URLencode the value. To learn more about the various identifiers for messages and how to convert between them, read here: https://learn.microsoft.com/en-us/graph/api/user-translateexchangeids?view=graph-rest-1.0&tabs=http