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
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,854 questions
0 comments No comments
{count} votes

Accepted answer
  1. Zehui Yao_MSFT 5,871 Reputation points
    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.