Change email sender name in Microsoft Graph API is not working

HOAL 21 Reputation points
2020-06-15T12:34:53.157+00:00

First, Thank you for adding chatbots to your web interfaces that help us ask questions and getting answers quickly like each and every website in the world, instead of searching for half an hour trying to find a way to contact you !!

Now, my question is:

I am using Microsoft Graph rest API v1.0 in order to send emails from our solution. I am using postman application for testing and emails are being sent successfully. The problem is that we want to use object "from" to send email from another sender and by setting another name; The administrator has granted access to send email as another user and it worked successfully, but I am unable to change the sender name; Below is an example of the body parameters:

{
  "message": {
    "subject": "Test",
    "body": {
      "contentType": "Html",
      "content": "Hello, this is a test to check the sender's name"
    },
   "from": {
        "emailAddress": {
        "name" :"No Replyy",
          "address": "noreply@.."        
        }
    },
    "toRecipients": [
      {
        "emailAddress": {
          "address": "..."
        }
      }
    ]
  }
}

The email is being sent using noreply@.. but the email name is not changing to "No Replyyy"; Can you help me to solve the issue?

Thank you in advance.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,463 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Yechiel Hadad 6 Reputation points
    2021-10-06T07:47:04.367+00:00

    Hi,
    Does anybody find any workaround for this issue?

    1 person found this answer helpful.
    0 comments No comments

  2. AmanpreetSingh-MSFT 56,486 Reputation points
    2020-06-15T14:23:59.007+00:00

    Hello @HOAL I tested below call and it worked perfectly for me:

    Call: POST https://graph.microsoft.com/v1.0/me/sendMail

    Body: {"message":{"subject":"Meet for lunch at 3?","body":{"contentType":"Text","content":"The new cafeteria is open."},"toRecipients":[{"emailAddress":{"address":"receiver@example.com"}}],"from":{"emailAddress":{"address":"obouser@mytenant.onmicrosoft.com"}}},"saveToSentItems":"false"}

    Additional info:

    • From O365 portal added User1 to the properties of obouser under SendAs and SendOnBehalf mailox permissions.
    • Logged in with User1@mytenant.onmicrosoft.com at https://developer.microsoft.com/en-us/graph/graph-explorer.
    • Used above call to send the email.
    • Verified that receiver@example.com received email from obouser and not from User1.
    • Removed the from parameter from the body and confirmed that the recipient received the email from User1.

    Please do not forget to "Accept the answer" wherever the information provided helps you. This will help others in the community as well.


  3. Victor Ivanidze 101 Reputation points
    2022-09-23T12:16:01.207+00:00

    Yes. Create a distribution list noreply@Company portal .com with no members and send as this DL.

    0 comments No comments

  4. Pablo Pissi 1 Reputation point
    2022-10-06T18:21:04.59+00:00

    Is there a bug tracker with this issue in order to update our apps when the issue is resolved?

    0 comments No comments