All Apps and Add-ons

Microsoft Office 365 Reporting Add-on for Splunk: Why is it returning "500 Server Error: Internal Server Error for url"?

parikshithreddy
Engager

O365 message trace logs suddenly stopped logging.

We are seeing following error in Splunkd.log

ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-MS_O365_Reporting/bin/ms_o365_message_trace.py" HTTP Request error: 500 Server Error: Internal Server Error for url: https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?

We had that verified credentials are valid.

Please suggest how to fix this.

Labels (1)

haraksin
Path Finder

I opened a case with microsoft for this error - the issue for me was that the docs (both on splunkbase and in the Microsoft docs article referenced by Splunkbase) say that the Message Trace API can gather data up to 30 days prior. This is incorrect. The correct documentation can be found here, which shows that only a max of 10 days prior is allowed: https://docs.microsoft.com/en-us/powershell/module/exchange/get-messagetrace?redirectedfrom=MSDN&vie...

Switching the start_date from 30 days to 9 or 10 days prior ended up working for me!

0 Karma

gordo32
Communicator

This thread has a working solution:

https://community.splunk.com/t5/All-Apps-and-Add-ons/Microsoft-Office-365-Reporting-Add-on-for-Splun...

@poisar opened a case with MS and adding a \ before the $filter in the script solved the problem for me

0 Karma

jeremiahhainly
Explorer
0 Karma

gaurav_maniar
Builder

Hi @parikshithreddy ,

If your credential are correct than most probably, it is not able to connect to MS Office365 portal due to proxy or firewall settings.
You may be able to access the portal via web browser, but api callls from terminals are blocked due to your network proxy or firewall settings.

If it is not the case, please share some logs.

Accept & up-vote the answer if it helps.

0 Karma
Get Updates on the Splunk Community!

.conf25 Registration is OPEN!

Ready. Set. Splunk! Your favorite Splunk user event is back and better than ever. Get ready for more technical ...

Detecting Cross-Channel Fraud with Splunk

This article is the final installment in our three-part series exploring fraud detection techniques using ...

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...