Office365报告REST API-“;该查询无效。”;

Office365报告REST API-“;该查询无效。”;,rest,office365,Rest,Office365,为什么我能够使用以下请求查询Office365的报告API: https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$select=Subject,SenderAddress,RecipientAddress,Status,Received,Received&$filter=SenderAddress eq 'foo@bar.com' and RecipientAddress eq

为什么我能够使用以下请求查询Office365的报告API:

https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$select=Subject,SenderAddress,RecipientAddress,Status,Received,Received&$filter=SenderAddress eq 'foo@bar.com' and RecipientAddress eq 'bar@foo.com' and StartDate eq datetime'2016-10-01T00:00:00' and EndDate eq datetime'2016-10-03T00:00:00'
但当我修改它以过滤主题时,它也会返回一个错误:

https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$select=Subject,SenderAddress,RecipientAddress,Status,Received,Received&$filter=SenderAddress eq 'foo@bar.com' and RecipientAddress eq 'bar@foo.com' and StartDate eq datetime'2016-10-01T00:00:00' and EndDate eq datetime'2016-10-03T00:00:00' and Subject eq 'Test'
{“odata.error”:{ “代码”:“InvalidQueryException”, “信息”:{ “郎”:“, “值”:“查询无效。” }}}

试试像这样的东西

startswith(Subject,'Test')

您介意发布模式和一个示例行吗?当我的查询突然被拒绝时,我遇到了类似的问题。在我的例子中,不太可能的解决方案是在时间值上添加一个小数部分:2018-09-13T12:27:46.0000000不幸的是,这也不起作用。我们最后做了一些(不幸的是效率低下)后处理来过滤我们的终端。