View on GitHub

Office and Azure Audit Log Collector

Collect / retrieve Office365, Azure and DLP audit logs and output to PRTG, Azure Log Analytics Workspace, Graylog, and/or file output.

Office and Azure Audit Log Collector | Collect / retrieve Office365, Azure and DLP audit logs and output to PRTG, Azure Log Analytics Workspace, Graylog, and/or file output.

Anouncements:

Office365 audit log collector

Collect/retrieve Office365, Azure and DLP audit logs, optionally filter them, then send them to one or more outputs (see full list below). Onboarding is easy and takes only a few minutes (see ‘Onboarding’ section). There are Windows and Linux executables. Configuration is easy with a YAML config file (see the ‘ConfigExamples’ folder for reference). If you have any issues or questions, or requests for additional interfaces, feel free to create an issue in this repo.

Feel free to contribute other outputs if you happen to build any. Also open to any other useful pull requests! See the following link for more info on the management APIs: https://msdn.microsoft.com/en-us/office-365/office-365-management-activity-api-reference.

Use cases:

Latest changes:

Instructions:

Onboarding (one time only):

Running the collector:

You can schedule to run the executable with CRON or Task Scheduler. Alternatively, you can use the “schedule” option in the YAML config to run the executable once and have it schedule itself (see ConfigExamples/schedule.yaml).

To run the command-line executable use the following syntax:

OfficeAuditLogCollector(.exe) %tenant_id% %client_key% %secret_key% –config %path/to/config.yaml%

To create a config file you can start with the ‘fullConfig.yaml’ from the ConfigExamples folder. This has all the possible options and some explanatory comments. Cross-reference with a config example using the output(s) of your choice, and you should be set.

(optional) Creating an Azure Log Analytics Workspace (OMS):

If you are running this script to get audit events in an Azure Analytics Workspace you will need a Workspace ID and a shared key.

(optional) Creating an Azure Table / Blob account:

If you are running this script to get audit events in an Azure Table and/or Blob you will need a storage account and connection string:

(optional) Creating a PRTG sensor

To run with PRTG you must create a sensor:

(optional) Using ( Azure ) SQL

If you are running this script to get audit events in an SQL database you will need an ODBC driver and a connection string

(optional) Creating a Graylog input

If you are running this script to get audit events in Graylog you will need to create a Graylog input and an extractor. Check here for a detailed instruction.