<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Add-on for Microsoft Office 365 Reporting Web Service 404 and 400 errors in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-Microsoft-Office-365-Reporting-Web-Service-404-and/m-p/618899#M77883</link>
    <description>&lt;P&gt;Thanks for the reply! So, I've set a start date of 3 days ago, and increased the query size to 1440. And checked that there's been some mail sent or received in that window (there has) but I'm getting the same error:&lt;/P&gt;&lt;P&gt;&amp;lt;snip&amp;gt;&lt;/P&gt;&lt;P&gt;2022-10-31 09:28:00,492 INFO pid=89545 tid=MainThread file=splunk_rest_client.py:_request_handler:99 | Use HTTP connection pooling&lt;BR /&gt;2022-10-31 09:28:00,494 DEBUG pid=89545 tid=MainThread file=binding.py:get:695 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/TA_MS_O365_Reporting_checkpointer" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/TA_MS_O365_Reporting_checkpointer&lt;/A&gt; (body: {})&lt;BR /&gt;2022-10-31 09:28:00,497 DEBUG pid=89545 tid=MainThread file=connectionpool.py:_new_conn:975 | Starting new HTTPS connection (1): 127.0.0.1:8089&lt;BR /&gt;2022-10-31 09:28:00,519 DEBUG pid=89545 tid=MainThread file=connectionpool.py:_make_request:461 | &lt;A href="https://127.0.0.1:8089" target="_blank"&gt;https://127.0.0.1:8089&lt;/A&gt; "GET /servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/TA_MS_O365_Reporting_checkpointer HTTP/1.1" 200 5562&lt;BR /&gt;2022-10-31 09:28:00,520 DEBUG pid=89545 tid=MainThread file=binding.py:new_f:74 | Operation took 0:00:00.026095&lt;BR /&gt;2022-10-31 09:28:00,521 DEBUG pid=89545 tid=MainThread file=binding.py:get:695 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/&lt;/A&gt; (body: {'count': -1, 'offset': 0, 'search': 'TA_MS_O365_Reporting_checkpointer'})&lt;BR /&gt;2022-10-31 09:28:00,533 DEBUG pid=89545 tid=MainThread file=connectionpool.py:_make_request:461 | &lt;A href="https://127.0.0.1:8089" target="_blank"&gt;https://127.0.0.1:8089&lt;/A&gt; "GET /servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/?count=-1&amp;amp;offset=0&amp;amp;search=TA_MS_O365_Reporting_checkpointer HTTP/1.1" 200 4714&lt;BR /&gt;2022-10-31 09:28:00,534 DEBUG pid=89545 tid=MainThread file=binding.py:new_f:74 | Operation took 0:00:00.013241&lt;BR /&gt;2022-10-31 09:28:00,538 DEBUG pid=89545 tid=MainThread file=binding.py:get:695 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/data/TA_MS_O365_Reporting_checkpointer/Test_obj_checkpoint_oauth" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/data/TA_MS_O365_Reporting_checkpointer/Test_obj_checkpoint_oauth&lt;/A&gt; (body: {})&lt;BR /&gt;2022-10-31 09:28:00,546 DEBUG pid=89545 tid=MainThread file=connectionpool.py:_make_request:461 | &lt;A href="https://127.0.0.1:8089" target="_blank"&gt;https://127.0.0.1:8089&lt;/A&gt; "GET /servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/data/TA_MS_O365_Reporting_checkpointer/Test_obj_checkpoint_oauth HTTP/1.1" 404 140&lt;BR /&gt;2022-10-31 09:28:00,548 DEBUG pid=89545 tid=MainThread file=base_modinput.py:log_debug:298 | _Splunk_ Start date: 2022-10-28 00:00:01, End date: 2022-10-29 00:00:01&lt;BR /&gt;2022-10-31 09:28:00,548 DEBUG pid=89545 tid=MainThread file=base_modinput.py:log_debug:298 | _Splunk_ message trace URL: &lt;A href="https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$filter=StartDate" target="_blank"&gt;https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$filter=StartDate&lt;/A&gt; eq datetime'2022-10-28T00:00:01Z' and EndDate eq datetime'2022-10-29T00:00:01Z'&lt;BR /&gt;2022-10-31 09:28:00,548 DEBUG pid=89545 tid=MainThread file=base_modinput.py:log_debug:298 | _Splunk_ Getting proxy server.&lt;BR /&gt;2022-10-31 09:28:00,548 INFO pid=89545 tid=MainThread file=setup_util.py:log_info:142 | Proxy is not enabled!&lt;BR /&gt;2022-10-31 09:28:00,551 DEBUG pid=89545 tid=MainThread file=connectionpool.py:_new_conn:975 | Starting new HTTPS connection (1): login.windows.net:443&lt;BR /&gt;2022-10-31 09:28:00,683 DEBUG pid=89545 tid=MainThread file=connectionpool.py:_make_request:461 | &lt;A href="https://login.windows.net:443" target="_blank"&gt;https://login.windows.net:443&lt;/A&gt; "POST /71477e1d-2b72-4543-a318-e4b4a93b25c8/oauth2/token HTTP/1.1" 400 747&lt;BR /&gt;2022-10-31 09:28:00,688 ERROR pid=89545 tid=MainThread file=base_modinput.py:log_error:316 | Get error when collecting events.&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "/opt/splunk/etc/apps/TA-MS_O365_Reporting/lib/splunktaucclib/modinput_wrapper/base_modinput.py", line 140, in stream_events&lt;BR /&gt;self.collect_events(ew)&lt;BR /&gt;File "/opt/splunk/etc/apps/TA-MS_O365_Reporting/bin/ms_o365_message_trace_oauth.py", line 362, in collect_events&lt;BR /&gt;get_events_continuous(helper, ew)&lt;BR /&gt;File "/opt/splunk/etc/apps/TA-MS_O365_Reporting/bin/ms_o365_message_trace_oauth.py", line 98, in get_events_continuous&lt;BR /&gt;if 'value' in message_response:&lt;BR /&gt;TypeError: argument of type 'NoneType' is not iterable&lt;/P&gt;&lt;P&gt;&amp;lt;/snip&amp;gt;&lt;/P&gt;&lt;P&gt;I thought I'd try this on a completely separate system with more mail flowing. I confirmed at least 250 messages in the period I've selected but I still get:&lt;/P&gt;&lt;P&gt;&amp;lt;snip&amp;gt;&lt;/P&gt;&lt;P&gt;2022-10-31 09:41:25,161 INFO pid=5298 tid=MainThread file=splunk_rest_client.py:_request_handler:99 | Use HTTP connection pooling&lt;BR /&gt;2022-10-31 09:41:25,162 DEBUG pid=5298 tid=MainThread file=binding.py:get:695 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/TA_MS_O365_Reporting_checkpointer" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/TA_MS_O365_Reporting_checkpointer&lt;/A&gt; (body: {})&lt;BR /&gt;2022-10-31 09:41:25,163 DEBUG pid=5298 tid=MainThread file=connectionpool.py:_new_conn:941 | Starting new HTTPS connection (1): 127.0.0.1:8089&lt;BR /&gt;2022-10-31 09:41:25,166 DEBUG pid=5298 tid=MainThread file=connectionpool.py:_make_request:442 | &lt;A href="https://127.0.0.1:8089" target="_blank"&gt;https://127.0.0.1:8089&lt;/A&gt; "GET /servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/TA_MS_O365_Reporting_checkpointer HTTP/1.1" 200 5851&lt;BR /&gt;2022-10-31 09:41:25,167 DEBUG pid=5298 tid=MainThread file=binding.py:new_f:74 | Operation took 0:00:00.005282&lt;BR /&gt;2022-10-31 09:41:25,167 DEBUG pid=5298 tid=MainThread file=binding.py:get:695 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/&lt;/A&gt; (body: {'count': -1, 'offset': 0, 'search': 'TA_MS_O365_Reporting_checkpointer'})&lt;BR /&gt;2022-10-31 09:41:25,171 DEBUG pid=5298 tid=MainThread file=connectionpool.py:_make_request:442 | &lt;A href="https://127.0.0.1:8089" target="_blank"&gt;https://127.0.0.1:8089&lt;/A&gt; "GET /servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/?count=-1&amp;amp;offset=0&amp;amp;search=TA_MS_O365_Reporting_checkpointer HTTP/1.1" 200 5003&lt;BR /&gt;2022-10-31 09:41:25,171 DEBUG pid=5298 tid=MainThread file=binding.py:new_f:74 | Operation took 0:00:00.004004&lt;BR /&gt;2022-10-31 09:41:25,172 DEBUG pid=5298 tid=MainThread file=binding.py:get:695 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/data/TA_MS_O365_Reporting_checkpointer/InstallationTechnology_obj_checkpoint_oauth" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/data/TA_MS_O365_Reporting_checkpointer/InstallationTechnology_obj_checkpoint_oauth&lt;/A&gt; (body: {})&lt;BR /&gt;2022-10-31 09:41:25,174 DEBUG pid=5298 tid=MainThread file=connectionpool.py:_make_request:442 | &lt;A href="https://127.0.0.1:8089" target="_blank"&gt;https://127.0.0.1:8089&lt;/A&gt; "GET /servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/data/TA_MS_O365_Reporting_checkpointer/InstallationTechnology_obj_checkpoint_oauth HTTP/1.1" 404 140&lt;BR /&gt;2022-10-31 09:41:25,175 DEBUG pid=5298 tid=MainThread file=base_modinput.py:log_debug:298 | _Splunk_ Start date: 2022-10-27 00:00:01, End date: 2022-10-28 00:00:01&lt;BR /&gt;2022-10-31 09:41:25,175 DEBUG pid=5298 tid=MainThread file=base_modinput.py:log_debug:298 | _Splunk_ message trace URL: &lt;A href="https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$filter=StartDate" target="_blank"&gt;https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$filter=StartDate&lt;/A&gt; eq datetime'2022-10-27T00:00:01Z' and EndDate eq datetime'2022-10-28T00:00:01Z'&lt;BR /&gt;2022-10-31 09:41:25,175 DEBUG pid=5298 tid=MainThread file=base_modinput.py:log_debug:298 | _Splunk_ Getting proxy server.&lt;BR /&gt;2022-10-31 09:41:25,175 INFO pid=5298 tid=MainThread file=setup_util.py:log_info:142 | Proxy is not enabled!&lt;BR /&gt;2022-10-31 09:41:25,176 DEBUG pid=5298 tid=MainThread file=connectionpool.py:_new_conn:941 | Starting new HTTPS connection (1): login.windows.net:443&lt;BR /&gt;2022-10-31 09:41:25,303 DEBUG pid=5298 tid=MainThread file=connectionpool.py:_make_request:442 | &lt;A href="https://login.windows.net:443" target="_blank"&gt;https://login.windows.net:443&lt;/A&gt; "POST /a323165a-9318-4e8b-9cf7-321bc355d592/oauth2/token HTTP/1.1" 400 758&lt;BR /&gt;2022-10-31 09:41:25,306 ERROR pid=5298 tid=MainThread file=base_modinput.py:log_error:316 | Get error when collecting events.&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "/mnt/hd2/splunk/etc/apps/TA-MS_O365_Reporting/lib/splunktaucclib/modinput_wrapper/base_modinput.py", line 140, in stream_events&lt;BR /&gt;self.collect_events(ew)&lt;BR /&gt;File "/opt/splunk/etc/apps/TA-MS_O365_Reporting/bin/ms_o365_message_trace_oauth.py", line 362, in collect_events&lt;BR /&gt;get_events_continuous(helper, ew)&lt;BR /&gt;File "/opt/splunk/etc/apps/TA-MS_O365_Reporting/bin/ms_o365_message_trace_oauth.py", line 98, in get_events_continuous&lt;BR /&gt;if 'value' in message_response:&lt;BR /&gt;TypeError: argument of type 'NoneType' is not iterable&lt;/P&gt;&lt;P&gt;&amp;lt;/snip&amp;gt;&lt;/P&gt;&lt;P&gt;So, still can't get it to work...&lt;/P&gt;</description>
    <pubDate>Mon, 31 Oct 2022 09:44:36 GMT</pubDate>
    <dc:creator>stephanfreeman</dc:creator>
    <dc:date>2022-10-31T09:44:36Z</dc:date>
    <item>
      <title>Add-on for Microsoft Office 365 Reporting Web Service 404 and 400 errors?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-Microsoft-Office-365-Reporting-Web-Service-404-and/m-p/618001#M77838</link>
      <description>&lt;P&gt;I am struggling to get the MS O365 reporting app working with OAuth. Here's the error in ta_ms_o365_reporting_ms_o365_message_trace_oauth.log:&lt;/P&gt;
&lt;P&gt;2022-10-21 16:24:38,096 INFO pid=91299 tid=MainThread file=splunk_rest_client.py:_request_handler:99 | Use HTTP connection pooling&lt;BR /&gt;2022-10-21 16:24:38,097 DEBUG pid=91299 tid=MainThread file=binding.py:get:695 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/TA_MS_O365_Reporting_checkpointer" target="_blank" rel="noopener"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/TA_MS_O365_Reporting_checkpointer&lt;/A&gt; (body: {})&lt;BR /&gt;2022-10-21 16:24:38,100 DEBUG pid=91299 tid=MainThread file=connectionpool.py:_new_conn:975 | Starting new HTTPS connection (1): 127.0.0.1:8089&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;2022-10-21 16:24:38,122 DEBUG pid=91299 tid=MainThread file=connectionpool.py:_make_request:461 | &lt;A href="https://127.0.0.1:8089" target="_blank" rel="noopener"&gt;https://127.0.0.1:8089&lt;/A&gt; "GET /servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/TA_MS_O365_Reporting_checkpointer HTTP/1.1" 200 5562&lt;/FONT&gt;&lt;BR /&gt;2022-10-21 16:24:38,123 DEBUG pid=91299 tid=MainThread file=binding.py:new_f:74 | Operation took 0:00:00.025611&lt;BR /&gt;2022-10-21 16:24:38,124 DEBUG pid=91299 tid=MainThread file=binding.py:get:695 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/" target="_blank" rel="noopener"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/&lt;/A&gt; (body: {'count': -1, 'offset': 0, 'search': 'TA_MS_O365_Reporting_checkpointer'})&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;2022-10-21 16:24:38,136 DEBUG pid=91299 tid=MainThread file=connectionpool.py:_make_request:461 | &lt;A href="https://127.0.0.1:8089" target="_blank" rel="noopener"&gt;https://127.0.0.1:8089&lt;/A&gt; "GET /servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/?count=-1&amp;amp;offset=0&amp;amp;search=TA_MS_O365_Reporting_checkpointer HTTP/1.1" 200 4714&lt;/FONT&gt;&lt;BR /&gt;2022-10-21 16:24:38,137 DEBUG pid=91299 tid=MainThread file=binding.py:new_f:74 | Operation took 0:00:00.013834&lt;BR /&gt;2022-10-21 16:24:38,141 DEBUG pid=91299 tid=MainThread file=binding.py:get:695 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/data/TA_MS_O365_Reporting_checkpointer/Testing_obj_checkpoint_oauth" target="_blank" rel="noopener"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/data/TA_MS_O365_Reporting_checkpointer/Testing_obj_checkpoint_oauth&lt;/A&gt; (body: {})&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;2022-10-21 16:24:38,149 DEBUG pid=91299 tid=MainThread file=connectionpool.py:_make_request:461 | &lt;A href="https://127.0.0.1:8089" target="_blank" rel="noopener"&gt;https://127.0.0.1:8089&lt;/A&gt; "GET /servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/data/TA_MS_O365_Reporting_checkpointer/Testing_obj_checkpoint_oauth HTTP/1.1" 404 140&lt;/FONT&gt;&lt;BR /&gt;2022-10-21 16:24:38,151 DEBUG pid=91299 tid=MainThread file=base_modinput.py:log_debug:298 | _Splunk_ Start date: 2022-10-16 16:24:38.151205, End date: 2022-10-16 17:24:38.151205&lt;BR /&gt;2022-10-21 16:24:38,151 DEBUG pid=91299 tid=MainThread file=base_modinput.py:log_debug:298 | _Splunk_ message trace URL: &lt;A href="https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$filter=StartDate" target="_blank" rel="noopener"&gt;https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$filter=StartDate&lt;/A&gt; eq datetime'2022-10-16T16:24:38.151205Z' and EndDate eq datetime'2022-10-16T17:24:38.151205Z'&lt;BR /&gt;2022-10-21 16:24:38,151 DEBUG pid=91299 tid=MainThread file=base_modinput.py:log_debug:298 | _Splunk_ Getting proxy server.&lt;BR /&gt;2022-10-21 16:24:38,151 INFO pid=91299 tid=MainThread file=setup_util.py:log_info:142 | Proxy is not enabled!&lt;BR /&gt;2022-10-21 16:24:38,154 DEBUG pid=91299 tid=MainThread file=connectionpool.py:_new_conn:975 | Starting new HTTPS connection (1): login.windows.net:443&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;2022-10-21 16:24:38,284 DEBUG pid=91299 tid=MainThread file=connectionpool.py:_make_request:461 | &lt;A href="https://login.windows.net:443" target="_blank" rel="noopener"&gt;https://login.windows.net:443&lt;/A&gt; "POST /[TENANT ID]/oauth2/token HTTP/1.1" 400 747&lt;/FONT&gt;&lt;BR /&gt;2022-10-21 16:24:38,290 ERROR pid=91299 tid=MainThread file=base_modinput.py:log_error:316 | Get error when collecting events.&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "/opt/splunk/etc/apps/TA-MS_O365_Reporting/lib/splunktaucclib/modinput_wrapper/base_modinput.py", line 140, in stream_events&lt;BR /&gt;self.collect_events(ew)&lt;BR /&gt;File "/opt/splunk/etc/apps/TA-MS_O365_Reporting/bin/ms_o365_message_trace_oauth.py", line 362, in collect_events&lt;BR /&gt;get_events_continuous(helper, ew)&lt;BR /&gt;File "/opt/splunk/etc/apps/TA-MS_O365_Reporting/bin/ms_o365_message_trace_oauth.py", line 98, in get_events_continuous&lt;BR /&gt;if 'value' in message_response:&lt;BR /&gt;TypeError: argument of type 'NoneType' is not iterable&lt;/P&gt;
&lt;P&gt;I've highlighted the requests that got a HTTP repsonse code of 200 in blue, and the 404 and 400 errors in red.&lt;/P&gt;
&lt;P&gt;If I use curl to access the URL with the 404 error I get:&lt;/P&gt;
&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;&amp;lt;response&amp;gt;&lt;BR /&gt;&amp;lt;messages&amp;gt;&lt;BR /&gt;&amp;lt;msg type="ERROR"&amp;gt;Could not find object.&amp;lt;/msg&amp;gt;&lt;BR /&gt;&amp;lt;/messages&amp;gt;&lt;BR /&gt;&amp;lt;/response&amp;gt;&lt;/P&gt;
&lt;P&gt;It looks like this is trying to access a "storage" directory inside /opt/splunk/etc/apps/TA-MS_O365_Reporting, which doesn't exist&lt;/P&gt;
&lt;P&gt;Looking at splunkd_access.log, when running curl, I get:&lt;/P&gt;
&lt;P&gt;127.0.0.1 - splunk-system-user [21/Oct/2022:16:53:37.043 +0100] "GET /servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/data/TA_MS_O365_Reporting_checkpointer/Testing_obj_checkpoint_oauth HTTP/1.1" 404 140 "-" "curl" - - - 5ms&lt;/P&gt;
&lt;P&gt;What I've tried and checked:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Splunk is running as the splunk user&lt;/LI&gt;
&lt;LI&gt;I've checked and reset the filesystem permissions for /opt/splunk&lt;/LI&gt;
&lt;LI&gt;I've deleted and recreated the inputs and the accounts&lt;/LI&gt;
&lt;LI&gt;I've deleted the app and re-installed, both through the CLI and Splunk Web&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Things that are less likely to be related, but I've done anyway:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I've created new credentials in Azure for my enterprise app&lt;/LI&gt;
&lt;LI&gt;I've checked the permissions in Azure and confirmed that the permissions have been correctly granted&lt;/LI&gt;
&lt;LI&gt;The enterprise app in Azure is in the Global Reader and Exchange Administrator roles&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I'm out of ideas so any help is gratefully received! I'm giessing that resolving the 404 may resolve the 400 to.&lt;/P&gt;
&lt;P&gt;Splunk v. 9.0.1&lt;/P&gt;
&lt;P&gt;Splunk Add-on for Microsoft Office 365 Reporting Web Service v. 2.0.1&lt;/P&gt;
&lt;P&gt;Ubuntu 20.04.5 LTS on VMware 7&lt;/P&gt;
&lt;P&gt;20 CPUs, 24GB RAM&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 17:48:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-Microsoft-Office-365-Reporting-Web-Service-404-and/m-p/618001#M77838</guid>
      <dc:creator>stephanfreeman</dc:creator>
      <dc:date>2022-10-27T17:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Add-on for Microsoft Office 365 Reporting Web Service 404 and 400 errors</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-Microsoft-Office-365-Reporting-Web-Service-404-and/m-p/618616#M77876</link>
      <description>&lt;P&gt;The 404 message about the checkpoint is not unexpected.&amp;nbsp; Here's why:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;When the input runs, it has to calculate a date range to ask for data from the API&lt;/LI&gt;&lt;LI&gt;The start date in that range is calculated like this:&lt;UL&gt;&lt;LI&gt;Look for a checkpoint value&lt;/LI&gt;&lt;LI&gt;If there is no checkpoint value, look for a start date specified in the input&lt;/LI&gt;&lt;LI&gt;If there is no start date specified on the input, use a date 5 days in the past&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Once a start date is identified, an end date is calculated by adding the number of minutes specified in the query window size&lt;/LI&gt;&lt;LI&gt;Once data is collected, a checkpoint will be set to the largest time stamp seen during collection&lt;UL&gt;&lt;LI&gt;When the input runs again to calculate a start date, the checkpoint value will be used&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So, if you have never collected data, you'll get a 404 trying to retrieve a checkpoint that doesn't yet exist.&lt;/P&gt;&lt;P&gt;It looks like your query window size is set to 60 based on the logging messages.&amp;nbsp; This is typically okay in a production environment, but you may need to increase it if you're testing a low-volume environment.&amp;nbsp; I've seen this in dev/test environments and set the window to 1440 (24 hours) to ensure some data is retrieved.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 16:57:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-Microsoft-Office-365-Reporting-Web-Service-404-and/m-p/618616#M77876</guid>
      <dc:creator>jconger</dc:creator>
      <dc:date>2022-10-27T16:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Add-on for Microsoft Office 365 Reporting Web Service 404 and 400 errors</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-Microsoft-Office-365-Reporting-Web-Service-404-and/m-p/618899#M77883</link>
      <description>&lt;P&gt;Thanks for the reply! So, I've set a start date of 3 days ago, and increased the query size to 1440. And checked that there's been some mail sent or received in that window (there has) but I'm getting the same error:&lt;/P&gt;&lt;P&gt;&amp;lt;snip&amp;gt;&lt;/P&gt;&lt;P&gt;2022-10-31 09:28:00,492 INFO pid=89545 tid=MainThread file=splunk_rest_client.py:_request_handler:99 | Use HTTP connection pooling&lt;BR /&gt;2022-10-31 09:28:00,494 DEBUG pid=89545 tid=MainThread file=binding.py:get:695 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/TA_MS_O365_Reporting_checkpointer" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/TA_MS_O365_Reporting_checkpointer&lt;/A&gt; (body: {})&lt;BR /&gt;2022-10-31 09:28:00,497 DEBUG pid=89545 tid=MainThread file=connectionpool.py:_new_conn:975 | Starting new HTTPS connection (1): 127.0.0.1:8089&lt;BR /&gt;2022-10-31 09:28:00,519 DEBUG pid=89545 tid=MainThread file=connectionpool.py:_make_request:461 | &lt;A href="https://127.0.0.1:8089" target="_blank"&gt;https://127.0.0.1:8089&lt;/A&gt; "GET /servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/TA_MS_O365_Reporting_checkpointer HTTP/1.1" 200 5562&lt;BR /&gt;2022-10-31 09:28:00,520 DEBUG pid=89545 tid=MainThread file=binding.py:new_f:74 | Operation took 0:00:00.026095&lt;BR /&gt;2022-10-31 09:28:00,521 DEBUG pid=89545 tid=MainThread file=binding.py:get:695 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/&lt;/A&gt; (body: {'count': -1, 'offset': 0, 'search': 'TA_MS_O365_Reporting_checkpointer'})&lt;BR /&gt;2022-10-31 09:28:00,533 DEBUG pid=89545 tid=MainThread file=connectionpool.py:_make_request:461 | &lt;A href="https://127.0.0.1:8089" target="_blank"&gt;https://127.0.0.1:8089&lt;/A&gt; "GET /servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/?count=-1&amp;amp;offset=0&amp;amp;search=TA_MS_O365_Reporting_checkpointer HTTP/1.1" 200 4714&lt;BR /&gt;2022-10-31 09:28:00,534 DEBUG pid=89545 tid=MainThread file=binding.py:new_f:74 | Operation took 0:00:00.013241&lt;BR /&gt;2022-10-31 09:28:00,538 DEBUG pid=89545 tid=MainThread file=binding.py:get:695 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/data/TA_MS_O365_Reporting_checkpointer/Test_obj_checkpoint_oauth" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/data/TA_MS_O365_Reporting_checkpointer/Test_obj_checkpoint_oauth&lt;/A&gt; (body: {})&lt;BR /&gt;2022-10-31 09:28:00,546 DEBUG pid=89545 tid=MainThread file=connectionpool.py:_make_request:461 | &lt;A href="https://127.0.0.1:8089" target="_blank"&gt;https://127.0.0.1:8089&lt;/A&gt; "GET /servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/data/TA_MS_O365_Reporting_checkpointer/Test_obj_checkpoint_oauth HTTP/1.1" 404 140&lt;BR /&gt;2022-10-31 09:28:00,548 DEBUG pid=89545 tid=MainThread file=base_modinput.py:log_debug:298 | _Splunk_ Start date: 2022-10-28 00:00:01, End date: 2022-10-29 00:00:01&lt;BR /&gt;2022-10-31 09:28:00,548 DEBUG pid=89545 tid=MainThread file=base_modinput.py:log_debug:298 | _Splunk_ message trace URL: &lt;A href="https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$filter=StartDate" target="_blank"&gt;https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$filter=StartDate&lt;/A&gt; eq datetime'2022-10-28T00:00:01Z' and EndDate eq datetime'2022-10-29T00:00:01Z'&lt;BR /&gt;2022-10-31 09:28:00,548 DEBUG pid=89545 tid=MainThread file=base_modinput.py:log_debug:298 | _Splunk_ Getting proxy server.&lt;BR /&gt;2022-10-31 09:28:00,548 INFO pid=89545 tid=MainThread file=setup_util.py:log_info:142 | Proxy is not enabled!&lt;BR /&gt;2022-10-31 09:28:00,551 DEBUG pid=89545 tid=MainThread file=connectionpool.py:_new_conn:975 | Starting new HTTPS connection (1): login.windows.net:443&lt;BR /&gt;2022-10-31 09:28:00,683 DEBUG pid=89545 tid=MainThread file=connectionpool.py:_make_request:461 | &lt;A href="https://login.windows.net:443" target="_blank"&gt;https://login.windows.net:443&lt;/A&gt; "POST /71477e1d-2b72-4543-a318-e4b4a93b25c8/oauth2/token HTTP/1.1" 400 747&lt;BR /&gt;2022-10-31 09:28:00,688 ERROR pid=89545 tid=MainThread file=base_modinput.py:log_error:316 | Get error when collecting events.&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "/opt/splunk/etc/apps/TA-MS_O365_Reporting/lib/splunktaucclib/modinput_wrapper/base_modinput.py", line 140, in stream_events&lt;BR /&gt;self.collect_events(ew)&lt;BR /&gt;File "/opt/splunk/etc/apps/TA-MS_O365_Reporting/bin/ms_o365_message_trace_oauth.py", line 362, in collect_events&lt;BR /&gt;get_events_continuous(helper, ew)&lt;BR /&gt;File "/opt/splunk/etc/apps/TA-MS_O365_Reporting/bin/ms_o365_message_trace_oauth.py", line 98, in get_events_continuous&lt;BR /&gt;if 'value' in message_response:&lt;BR /&gt;TypeError: argument of type 'NoneType' is not iterable&lt;/P&gt;&lt;P&gt;&amp;lt;/snip&amp;gt;&lt;/P&gt;&lt;P&gt;I thought I'd try this on a completely separate system with more mail flowing. I confirmed at least 250 messages in the period I've selected but I still get:&lt;/P&gt;&lt;P&gt;&amp;lt;snip&amp;gt;&lt;/P&gt;&lt;P&gt;2022-10-31 09:41:25,161 INFO pid=5298 tid=MainThread file=splunk_rest_client.py:_request_handler:99 | Use HTTP connection pooling&lt;BR /&gt;2022-10-31 09:41:25,162 DEBUG pid=5298 tid=MainThread file=binding.py:get:695 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/TA_MS_O365_Reporting_checkpointer" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/TA_MS_O365_Reporting_checkpointer&lt;/A&gt; (body: {})&lt;BR /&gt;2022-10-31 09:41:25,163 DEBUG pid=5298 tid=MainThread file=connectionpool.py:_new_conn:941 | Starting new HTTPS connection (1): 127.0.0.1:8089&lt;BR /&gt;2022-10-31 09:41:25,166 DEBUG pid=5298 tid=MainThread file=connectionpool.py:_make_request:442 | &lt;A href="https://127.0.0.1:8089" target="_blank"&gt;https://127.0.0.1:8089&lt;/A&gt; "GET /servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/TA_MS_O365_Reporting_checkpointer HTTP/1.1" 200 5851&lt;BR /&gt;2022-10-31 09:41:25,167 DEBUG pid=5298 tid=MainThread file=binding.py:new_f:74 | Operation took 0:00:00.005282&lt;BR /&gt;2022-10-31 09:41:25,167 DEBUG pid=5298 tid=MainThread file=binding.py:get:695 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/&lt;/A&gt; (body: {'count': -1, 'offset': 0, 'search': 'TA_MS_O365_Reporting_checkpointer'})&lt;BR /&gt;2022-10-31 09:41:25,171 DEBUG pid=5298 tid=MainThread file=connectionpool.py:_make_request:442 | &lt;A href="https://127.0.0.1:8089" target="_blank"&gt;https://127.0.0.1:8089&lt;/A&gt; "GET /servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/config/?count=-1&amp;amp;offset=0&amp;amp;search=TA_MS_O365_Reporting_checkpointer HTTP/1.1" 200 5003&lt;BR /&gt;2022-10-31 09:41:25,171 DEBUG pid=5298 tid=MainThread file=binding.py:new_f:74 | Operation took 0:00:00.004004&lt;BR /&gt;2022-10-31 09:41:25,172 DEBUG pid=5298 tid=MainThread file=binding.py:get:695 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/data/TA_MS_O365_Reporting_checkpointer/InstallationTechnology_obj_checkpoint_oauth" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/data/TA_MS_O365_Reporting_checkpointer/InstallationTechnology_obj_checkpoint_oauth&lt;/A&gt; (body: {})&lt;BR /&gt;2022-10-31 09:41:25,174 DEBUG pid=5298 tid=MainThread file=connectionpool.py:_make_request:442 | &lt;A href="https://127.0.0.1:8089" target="_blank"&gt;https://127.0.0.1:8089&lt;/A&gt; "GET /servicesNS/nobody/TA-MS_O365_Reporting/storage/collections/data/TA_MS_O365_Reporting_checkpointer/InstallationTechnology_obj_checkpoint_oauth HTTP/1.1" 404 140&lt;BR /&gt;2022-10-31 09:41:25,175 DEBUG pid=5298 tid=MainThread file=base_modinput.py:log_debug:298 | _Splunk_ Start date: 2022-10-27 00:00:01, End date: 2022-10-28 00:00:01&lt;BR /&gt;2022-10-31 09:41:25,175 DEBUG pid=5298 tid=MainThread file=base_modinput.py:log_debug:298 | _Splunk_ message trace URL: &lt;A href="https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$filter=StartDate" target="_blank"&gt;https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$filter=StartDate&lt;/A&gt; eq datetime'2022-10-27T00:00:01Z' and EndDate eq datetime'2022-10-28T00:00:01Z'&lt;BR /&gt;2022-10-31 09:41:25,175 DEBUG pid=5298 tid=MainThread file=base_modinput.py:log_debug:298 | _Splunk_ Getting proxy server.&lt;BR /&gt;2022-10-31 09:41:25,175 INFO pid=5298 tid=MainThread file=setup_util.py:log_info:142 | Proxy is not enabled!&lt;BR /&gt;2022-10-31 09:41:25,176 DEBUG pid=5298 tid=MainThread file=connectionpool.py:_new_conn:941 | Starting new HTTPS connection (1): login.windows.net:443&lt;BR /&gt;2022-10-31 09:41:25,303 DEBUG pid=5298 tid=MainThread file=connectionpool.py:_make_request:442 | &lt;A href="https://login.windows.net:443" target="_blank"&gt;https://login.windows.net:443&lt;/A&gt; "POST /a323165a-9318-4e8b-9cf7-321bc355d592/oauth2/token HTTP/1.1" 400 758&lt;BR /&gt;2022-10-31 09:41:25,306 ERROR pid=5298 tid=MainThread file=base_modinput.py:log_error:316 | Get error when collecting events.&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "/mnt/hd2/splunk/etc/apps/TA-MS_O365_Reporting/lib/splunktaucclib/modinput_wrapper/base_modinput.py", line 140, in stream_events&lt;BR /&gt;self.collect_events(ew)&lt;BR /&gt;File "/opt/splunk/etc/apps/TA-MS_O365_Reporting/bin/ms_o365_message_trace_oauth.py", line 362, in collect_events&lt;BR /&gt;get_events_continuous(helper, ew)&lt;BR /&gt;File "/opt/splunk/etc/apps/TA-MS_O365_Reporting/bin/ms_o365_message_trace_oauth.py", line 98, in get_events_continuous&lt;BR /&gt;if 'value' in message_response:&lt;BR /&gt;TypeError: argument of type 'NoneType' is not iterable&lt;/P&gt;&lt;P&gt;&amp;lt;/snip&amp;gt;&lt;/P&gt;&lt;P&gt;So, still can't get it to work...&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 09:44:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-Microsoft-Office-365-Reporting-Web-Service-404-and/m-p/618899#M77883</guid>
      <dc:creator>stephanfreeman</dc:creator>
      <dc:date>2022-10-31T09:44:36Z</dc:date>
    </item>
  </channel>
</rss>

