Bad Request While Trying to Send Mail

Ali Eren Altındağ 21 Reputation points
2023-01-05T02:20:52.31+00:00

I'm using microsoft graph api v1.0. I'm trying to send a mail behalf of a user with it's bearer token. The data I'm sending to microsoft servers is:

{"message":{"subject":"Test Mail","body":{"content":"Test Mail Body","contentType":"text"},"toRecipients":[{"emailAdress":{"adress":"a.altundag245@harsh.com .com"}}]}}

I'm getting 400 Bad Request error and I couldn't fix this.

Microsoft Graph Applications API
Microsoft Graph Applications API
A Microsoft API that enables you to manage these resources and actions related to applications in Azure Active Directory.
433 questions
No comments
{count} votes

Accepted answer
  1. Zehui Yao_MSFT 3,431 Reputation points Microsoft Employee
    2023-01-05T03:20:17.857+00:00

    Hi @Ali Eren Altındağ , I tested locally, and I noticed that you misspelled email address and address in the original post, except for this error, everything works fine, please check. If you still need any help, please feel free to comment below. Best Wishes.

    276314-image.png
    276333-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    No comments

0 additional answers

Sort by: Most helpful