Forum Discussion

MurugananthamD's avatar
MurugananthamD
Copper Contributor
Jul 21, 2025
Solved

Issue: NDR When Running Python File via Microsoft Graph API

Hi everyone,

I'm experiencing an NDR (Non-Delivery Report) error when running a Python script that uses the Microsoft Graph API. Here is my current setup:

  • Trial tenant
  • App registered in Azure Portal
  • Required permissions granted
  • Inbound connector configured in Exchange admin centre
  • Python code being executed from a VM (workgroup)

Error Details:

email address removed for privacy reasons

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(7186).

I've followed the documentation and believe I've set up everything required. Is there any step or configuration I might have missed?

Any guidance or suggestions would be greatly appreciated.

Thanks!

  • Hi,

    Sending e-mails thru PS/GAPI in trial subscription is by default blocked by Microsoft. Open request ticket from admin 365 portal. They will change it. 

    Brgds,

    Mateusz

4 Replies

  • Hi,

    Sending e-mails thru PS/GAPI in trial subscription is by default blocked by Microsoft. Open request ticket from admin 365 portal. They will change it. 

    Brgds,

    Mateusz

    • MurugananthamD's avatar
      MurugananthamD
      Copper Contributor

      Hi Matich3ck​ ,

      Yes, I have submitted the request to Microsoft, and they have added the trial tenant ID to the sending exclusion list.

      Thank you for your support.

  • Belicke's avatar
    Belicke
    Iron Contributor

    Ensure that the Graph API has the Mail.Send permission, check the email header format, and avoid NDRs.

Resources