当我在批量查询中搜索 Office 365 上的电子邮件时,我收到未终止的字符串文字错误。仅当我在主题搜索查询中有 # 字符时才会发生这种情况。
像这样的论坛讨论(https://issues.oasis-open.org/browse/ODATA-1101)建议我对 # 符号进行百分比编码,但它给出了同样的错误。
当我将以下请求发布到批处理端点时(https://graph.microsoft.com/v1.0/$batch)
{
"requests": [{
"id": 1,
"method": "GET",
"url": "/users/somemailbox@mytenant.onmicrosoft.com/messages?$select=id,internetMessageId,toRecipients,ccRecipients,bccRecipients,subject,isRead,sender,receivedDateTime&$top=500&$search=\"received>=2019-06-19 AND (subject:\\\"PO# 123\\\" AND from:email@domain.com)\""
}]
}
我收到这个错误
{
"responses": [
{
"id": "1",
"status": 400,
"body": {
"error": {
"code": "BadRequest",
"message": "There is an unterminated string literal at position 39 in '\"received>=2019-06-19 AND (subject:\\\"PO'.",
"innerError": {
"request-id": "801078a5-d3c6-4b93-a152-6653a3d8ca44",
"date": "2019-07-22T06:29:16"
}
}
}
}
]
}
你们能帮我解决我的搜索查询吗?
谢谢,阿希什