Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft Graph - Email Delivery Failure when using sendMail API

I'm having issue with https://graph.microsoft.com/v1.0/users/<userId>/sendMail.

I get 202 Accepted as response, however when I browsed to the user's mailbox above, I'm receiving delivery failure notification as below:

Delivery has failed to these recipients or groups:

<username>@outlook.com
Your message wasn't delivered because the recipient's email provider rejected it.
Remote Server returned '550 5.7.708 Service unavailable. Access denied, traffic not accepted from this IP. For more information please go to http://go.microsoft.com/fwlink/?LinkId=526653 AS(7171) [SYBPR01MB4428.ausprd01.prod.outlook.com]'

When I logon to Outlook and send email to <username>@outlook.com from <userId>'s Outlook, the email was sent successfully.

Anyone know what's happening here?

I've tried to add a SMTP connector, but doesn't fixed the problem. When SMTP connector send an email to test Outbound Email, it works fine as I can receive at <_username_>@outlook.com.

like image 389
NinjAk3 Avatar asked Jan 10 '20 10:01

NinjAk3


People also ask

Is Microsoft Graph API a REST API?

The Microsoft Graph API is a RESTful web API that enables you to access Microsoft Cloud service resources.

Is Microsoft Graph API the same as GraphQL?

Does the API use GraphQL? No – while the “Microsoft Graph” name may confuse some, the API itself is a normal REST API and doesn't use GraphQL at this point in time.

Is Microsoft Graph an API gateway?

Microsoft Graph is the unified gateway for developers to access all the data, intelligence and APIs housed in Microsoft's intelligent cloud including Exchange, SharePoint, Azure Active Directory, OneDrive, Outlook, OneNote, Planner, Excel and more.


1 Answers

If you follow the link provided, it explains what is happening

5.7.708 Access denied, traffic not accepted from this IP

The majority of traffic from this tenant has been detected as suspicious and has resulted in a ban on sending ability for the tenant.

Ensure that any compromises or open relays have been resolved, and then contact support through your regular channel.

For more information, see Fix email delivery issues for error codes 5.7.700 through 5.7.750 in Exchange Online.

like image 94
Marc LaFleur Avatar answered Oct 08 '22 19:10

Marc LaFleur