Occasionally emails sent via Graph API are not delivered

Lukasz 20 Reputation points
2023-01-11T09:15:32.74+00:00

Hello,

I have a .NET application that uses Graph API over Microsoft.Graph Nuget in order to send emails. Occasionally an email is not delivered and there is no trace of it in Exchange Online log. Graph returns a standard response "202 Accepted" without any error. How can I investigate why certain emails are not getting delivered?

Here is the response:

StatusCode: 202, ReasonPhrase: 'Accepted', Version: 1.1, Content: System.Net.Http.NoWriteNoSeekStreamContent, Headers:
{
  Cache-Control: private
  Date: Thu, 05 Jan 2023 08:22:11 GMT
  Strict-Transport-Security: max-age=31536000
  request-id: 8d1276ae-ce28-4db0-a4b2-b0981c6ce587
  client-request-id: 8d1276ae-ce28-4db0-a4b2-b0981c6ce587
  x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"FR2PEPF000001E4"}}
  Content-Length: 0
}

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. Bhanu Kiran 3,616 Reputation points
    2023-01-11T11:24:12.3566667+00:00

    Hello @Lukasz ,

    Could you please check your outlook sent items folder and confirm if you are able to see the sent mail? If yes, please check your inbox for any email delivery failed mail initiated by smtp.

    If you are getting an "Email Delivery Failed" error mail, generally these issues occur while using trail tenant to perform this send email activity using Graph API.

    This error occurs when sending email from known, low reputation IP addresses that are typically used by new customers on Trial tenants.
    To fix this issue your Tenant needs to be added to a sending exclusion for 60 days to allow them to use blocked IPs whilst they still have a new/trial license.

    Please raise a case with MS Support team from your tenant where you are facing issue and respective team will provide exclusion for your tenant.

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Lukasz 20 Reputation points
    2023-01-12T10:12:57.4233333+00:00

    Thank you Bhanu! The first sentence of your answer led me to the root cause. Emails were not always in sent items folder.

    0 comments No comments

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.