Hi Stephan, many thanks for this great article you have produced.  I’m having a proble with the HTTP action wher it’s returning a 400 error – “The query is invalid”.  My account is ok as I’ve tested it with Invole-WebRequest using the URI from the raw input of this action and it returns as 200.  So is does appear that there is an issue with the query.  I’ve compared the query to your github code and it’s identical, I’ve even copy your entire code and created a new Lofig App and still the same error.

There isn’t much to this action and I just can’t see what the issue would be, please see below for the raw input and output from the HTTP action:

 

Many Thanks

 

{
“uri”: “https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$filter=StartDate%20eq%20datetime’2020-05-20T12:42:17.5810703Z’%20and%20EndDate%20eq%20datetime’2020-06-19T12:42:17.9941616Z‘”,
“method”: “GET”,
“headers”: {
“Accept”: “application/json”,
“Content-Type”: “application/json”
},
“authentication”: {
“username”: “Myaccount@mydomain”,
“password”: “*sanitized*”,
“type”: “Basic”
}
}

 

 

 

{
“statusCode”: 400,
“headers”: {
“request-id”: “6332f49f-2fdd-4344-a072-ba2e7a8814b8”,
“X-CalculatedBETarget”: “CWXP265MB0119.GBRP265.PROD.OUTLOOK.COM”,
“X-BackEndHttpStatus”: “400”,
“X-RUM-Validated”: “1”,
“X-RWS-Error”: “Microsoft.Exchange.Management.ReportingTask.InvalidExpressionException”,
“X-Content-Type-Options”: “nosniff”,
“DataServiceVersion”: “3.0;”,
“X-RWS-Version”: “2013-V1”,
“X-DiagInfo”: “CWXP265MB0119”,
“X-BEServer”: “CWXP265MB0119”,
“X-UA-Compatible”: “IE=10”,
“Strict-Transport-Security”: “max-age=31536000; includeSubDomains”,
“X-Proxy-RoutingCorrectness”: “1”,
“X-Proxy-BackendServerStatus”: “400”,
“X-FEServer”: “AM6P192CA0010”,
“Cache-Control”: “no-store, no-cache”,
“Date”: “Fri, 19 Jun 2020 12:42:18 GMT”,
“Server”: “Microsoft-IIS/10.0”,
“X-AspNet-Version”: “4.0.30319”,
“X-Powered-By”: “ASP.NET”,
“Content-Length”: “102”,
“Content-Type”: “application/json; odata=minimalmetadata; streaming=true; charset=utf-8”
},
“body”: {
“odata.error”: {
“code”: “InvalidQueryException”,
“message”: {
“lang”: “”,
“value”: “The query is invalid.”
}
}
}
}