0

I am trying to create an outlook addin, that reads the selected mail in .MSG or .EML format. I found a Stackoverflow Question with a link to this documentation how to read a mail from Graph: https://learn.microsoft.com/en-us/graph/outlook-get-mime-message. I tried to use https://graph.microsoft.com/v1.0/me/messages/{id}/$value with the Graph tester. I entered all ids i could find in the Office.context.mailbox.item but none of them gave me a valid result. So where do I have to take the id from, the Graph Tester needs?

greg-e
  • 374
  • 4
  • 18
  • Try using `https://graph.microsoft.com/v1.0/me/messages` which gives the list of messages in your mailbox. Pick the id for which ever message you want MIME content for and then call `https://graph.microsoft.com/v1.0/me/messages/{id}/$value `. – Shiva Keshav Varma Nov 26 '20 at 12:11

1 Answers1

0

I found that: Office.context.mailbox.item.itemId.replace('/', '-').replace('+', '_'); gets the same id, the graph gives when asking for all messages via https://graph.microsoft.com/v1.0/me/messages. I just do not know why I have to replace chars in the id.

greg-e
  • 374
  • 4
  • 18