ddbnl / office365-audit-log-collector

Collect / retrieve Office365, AzureAD and DLP audit logs and output to PRTG, Azure Log Analytics Workspace, SQL, Graylog, Fluentd, and/or file output.
https://ddbnl.github.io/office365-audit-log-collector/
MIT License
105 stars 40 forks source link

Error: Error logging in: "'access_token'" #58

Closed ne0x86 closed 6 months ago

ne0x86 commented 7 months ago

Hi. Im getting this error when lauching .exe : Error logging in: "'access_token'"

I check so many times tenant id, client id an key, and all its ok. I dont know what I should check.

Thanks

ddbnl commented 6 months ago

Hi,

Sorry for the late reply, I was unable to work on this repo for a while.

If the tenant, app id and app key are all correct, I assume it would have to be the API permissons. Can you confirm if the app registration has the following permissions (and if they have 'admin consent')? The full instructions are in the repo readme.

Office 365 Management APIs' > 'Application permissions': Check 'ActivityFeed.Read' Check 'ActivityFeed.ReadDlp'

ne0x86 commented 6 months ago

Hi. First of all, thank you for your response.

I have reconfigured everything from 0 and now I no longer receive the same error:

Now I am getting this:

Traceback (most recent call last): File "AuditLogCollector.py", line 699, in File "AuditLogCollector.py", line 67, in run File "AuditLogCollector.py", line 75, in run_once File "AuditLogCollector.py", line 170, in _prepare_to_run File "AuditLogCollector.py", line 262, in _auto_subscribe RuntimeError: Auto subscribe enabled but could not get subscription status [16820] Failed to execute script 'AuditLogCollector' due to unhandled exception!

ANy idea how I can fix it?

ne0x86 commented 6 months ago

Nothing, its fixed grant permissions on api access. Sorry

ddbnl commented 6 months ago

Good to hear! No worries. I'll close the issue.