none
Send message with graph API RRS feed

  • Question

  • Hello,

    I'm trying to send a previously created message with MS Graph with url :

    https://graph.microsoft.com/v1.0/me/messages/{message id returned by graph when create message}/send

    But I have this error :

    Status Code: 500
    {
        "error": {
            "code": "InternalServerError",
            "message": "Object reference not set to an instance of an object.",
            "innerError": {
                "request-id": "2acc0a14-a171-44cd-aa93-4c868ea944d7",
                "date": "2017-04-05T09:29:06"
            }
        }
    }

    I've tried with graph explorer, with a message created with graph, with a message created with O365 Outlook, with and without attachment ...

    How can i send a draft message with Graph API ?

    Thanks for your help!

    Wednesday, April 5, 2017 9:37 AM

All replies

  • Hi,

    I'm not totally sure what you want to achieve. Seems to me that you want to send exactly the same email twice.

    But... You can create a draft message by using the message object and use the /messages shortcut: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_post_messages


    Regards, Sjoukje

    Please remember to click 'Mark as Answer' on the post that helps you.

    Monday, April 10, 2017 8:24 AM
    Moderator
  • Where you ever able to figure this out? I am running into the same issue. I can create a Draft and return an ID but when I try to call the api url "https://graph.microsoft.com/v1.0/me/messages/{message id returned by graph when create message}/send" the email will not send.

    The weird thing is if I try and run the exact same api commands in their Microsoft Graph Explorer everything runs just fine.

    Steps:

    1. https://graph.microsoft.com/v1.0/me/MailFolders/Drafts/messages
    2. get id from message returned via above call
    3. https://graph.microsoft.com/v1.0/me/messages/{message id}/send
    Tuesday, September 26, 2017 5:30 PM