locked
Retrieving Outlook Email data from O365 RRS feed

  • Question

  • Hi I am currently learning GraphAPI and stuff.

    I want to import my Outlook email data into CSV which contains "From" "To" "CC" "Title" "Body" columns so that I can do some machine learning with them.

    When I made a secret keys in Azure Active Directory and tried O365 Python library, my GET MESSAGE request simply brought titles of my emails, not even the body.

    I would like to get each items separately. Is it possible by O365 or GraphAPI? Or by any other tool that Azure provides?

    Tuesday, February 25, 2020 6:25 AM

All replies

  • @wannabeaiengineer,

    You need to use below call for this purpose:

    https://graph.microsoft.com/v1.0/me/messages/MESSAGE_ID?$select=from,toRecipients,ccRecipients,subject,bodyPreview 

    Note: You need to replace MESSAGE_ID  with actual message ID. To get the actual message ID,  use 

    https://graph.microsoft.com/v1.0/me/messages?$select=id

    -----------------------------------------------------------------------------------------------------------------------------------

    Please "accept as answer" or "vote as helpful" wherever the information provided helps you to help others in the community.

    -----------------------------------------------------------------------------------------------------------------------------------

    We're migrating from MSDN to Microsoft Q&A as our new forums and Azure Active Directory has already made the move!  In future, you can ask and look for the discussion for Azure Active Directory related questions here:    https://docs.microsoft.com/answers/topics/azure-active-directory.html.

    Wednesday, February 26, 2020 8:33 AM