I have what is hopefully a simple question. I am an admin for a office 365 account. Our company has a number of email accounts, one for each employee. I know that if I go to the office 365 admin page then navigate to compliance and then to the audit logs page I can get a list of the IP addresses of the all the user's logins for the last three months. I want to be able to do this automatically through and API. I know the information exists because I can get it using the GUI on the website. Can anyone help me find the API where I can access this? I have looked in many locations in the docs and using 'graph' and have been unable to find a way to access this information other than on the website.
For background I am using these IP addresses to find the locations of the logins to help us know immediately when our emails have been compromised. If there is another way to do this through an API that does not involve getting the IP address I would accept that as a solution as well.