Getting email from Graph API marked as suspicious when I send an email to my own Microsoft Email

GZ 40 Reputation points
2024-09-18T00:23:01.4433333+00:00

Hi,

I just signed up for a Microsoft business account I am using the Microsoft Graph API to create and send an emails (to myself as a first step) using the sendEmail API (https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=http). But the odd part is that, even when I send an email to my own Microsoft provided email address the API call succeeds, I get:

XYZ@XYZ.onmicrosoft.com

Your message wasn't delivered because the recipient's email provider rejected it.

Generating server: XYZ.namprd14.prod.outlook.com

XYZ@ XYZ.onmicrosoft.com

Remote server returned '550 5.7.501 Service unavailable. Spam abuse detected from IP range. For more information please go to http://go.microsoft.com/fwlink/?LinkId=526653. S(2017052602) [DS0PR14MB6484.namprd14.prod.outlook.com 2024-09-17T23:31:42.467Z 08DCD5D6641AB171]'

Original message headers:

Received: from XYZ.namprd14.prod.outlook.com

([fe80::402e:b412:343c:17c2]) by SA1PR14MB5485.namprd14.prod.outlook.com

([fe80::402e:b412:343c:17c2%7]) with mapi id 15.20.7962.022; Tue, 17 Sep 2024

23:31:42 +0000

MIME-Version: 1.0

Content-Type: text/plain

Date: Tue, 17 Sep 2024 23:31:42 +0000

Message-ID:

SA1PR14MB5485F59A3CFCCE32C90D8FD4F4612@SA1PR14MB5485.namprd14.prod.outlook.com

Subject: Test Subject

My email had title 'Test Subject' and body 'Hello! I am just doing a quick test to see if emailing works.'. Does anyone know the root cause of this? Is there a sandbox environment that an API is in until a request is made? What can I do to fix (after all, I am only emailing myself)?

Cheers!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,113 questions
Microsoft Entra
0 comments No comments
{count} votes

Accepted answer
  1. Hitesh Pachipulusu - MSFT 2,225 Reputation points Microsoft Vendor
    2024-09-18T07:28:38.35+00:00

    Hello GZ,

    Thank you for reaching out to Microsoft Support!

    The error '550 5.7.501 Service unavailable' indicates that your tenant is blocked from IP range. I would recommend you raise a support case with Microsoft Graph, a Support Engineer will be able to look into this issue and unblock the tenant. You can raise support ticket from New support request - Microsoft Entra admin center or https://admin.microsoft.com/#/support/requests.

    Hope this helps.

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

    1 person found this answer helpful.

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.