Jump to content


Rest-API Script to create Office 365 Objects

rest api office365

  • Please log in to reply
2 replies to this topic

#1 Michael Szekely

Michael Szekely
  • Members
  • 30 posts

Posted 25 June 2018 - 04:59 AM

Hi folks,


we would like to create a script(REST API) for a "dynamic" firewall object with the IP Adresses from Office 365 (https://support.office.com/de-de/article/urls-und-ip-adressbereiche-von-office-365-8548a211-3fe7-47cb-abb1-355ea5aa88a2)


We need this to bypass our Webproxy and allow direct connections to the o365 resources.


Does anyone already have script for this??



#2 Michael Zoller

Michael Zoller
  • Barracuda Team Members
  • 209 posts

Posted 25 June 2018 - 05:41 AM

I don't have a script, but maybe you could also do this via Application Based Provider selection connection objects that sends the office 365 traffic straight out while taking a different route (through the webproxy) for the rest? 


#3 Ulrich Heilmeier

Ulrich Heilmeier
  • Members
  • 2 posts

Posted 20 August 2018 - 12:33 AM

Maybe not exactly what you're looking for:
We have a Python script generating a network object to copy/paste into NGadmin GUI.

./ms_o365_ips_to_phion.py --product LYO --addresstype IPv6

This gives you a IPv6 network object with all Skype4Business Online (formerly known as LyncOnline) IPs to copy/paste.


Script URL (as I'm not able to attach files here, and linking is also prohibited ): https://gist.github.com/uhei/747a8225347115056464d22d8a02b125


Attention: this is a quick and dirty script without catching any exceptions etc...