How to Automate Adding IPs and Domains in Anti-Spam Policies Using Microsoft Defender API?

Abinaya V G 0 Reputation points
2025-09-24T08:55:22.35+00:00

Hi Everyone,

I am trying to automate the process of adding IP, Domain in the anti-spam policies in Microsoft Defender Portal. Right now these IP,Domain are manually added through the portal.

Whether there is any API available to automate the process or any other methods available for this process instead of manually adding each values.

Microsoft Security | Microsoft Defender | Microsoft Defender for Identity

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.