MS Graph API-Send mail-short url in message body delivered as longer in recipient mail

B Jayachithra 11 Reputation points
2023-11-14T12:24:11.3366667+00:00
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,580 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Akash Jadav 85 Reputation points Microsoft Vendor
    2023-11-29T17:29:30.7733333+00:00

    Can you please share a screenshot of the request made from MS Graph Explorer?
    Following is working fine for me:

    POST https://graph.microsoft.com/v1.0/me/sendMail
    Content-type: application/json
    
    {
      "message": {
        "subject": "Meet for lunch?",
        "body": {
          "contentType": "Text",
          "content": "ENTER_URL_HERE"
        },
        "toRecipients": [
          {
            "emailAddress": {
              "address": "frannis@contoso.onmicrosoft.com"
            }
          }
        ]
      }
    }
    

  2. B Jayachithra 11 Reputation points
    2023-12-14T09:31:26.8966667+00:00

    Hello,

    https://graph.microsoft.com/v1.0/me/sendMail will not work as our mailbox is using client credential flow instead delegated. Please provide sample POST URL for this type to test from Graph Explorer.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.