microsoftgraph / msgraph-sdk-java

Microsoft Graph SDK for Java
https://docs.microsoft.com/en-us/graph/sdks/sdks-overview
MIT License
387 stars 133 forks source link

Microsoft graph API has bug with validating message ids #559

Closed dparamoshkin closed 1 month ago

dparamoshkin commented 3 years ago

We are using java api to retrieve emails from user. First we receive all emails id and then retrieve them using batching request. The 2 emails are causing the problem if they come to same batch request. The difference between them is in the ending - YAAA= vs yAAA=

AAMkADdmOWY2MDdiLTBiZjktNDJlMi05NDliLWJmMDkzNmU1YjViNQBGAAAAAACuqO6r_QtETboIxVr3j6RqBwCjug_wz-R6Todrtnv-DjDjAAFVAJ0tAACjug_wz-R6Todrtnv-DjDjAAFjiRnYAAA= 
<531341740.3115.1601930424128@hf-release-compute-6df579d978-vn8cd> 
2020-11-09T17:42:07Z

AAMkADdmOWY2MDdiLTBiZjktNDJlMi05NDliLWJmMDkzNmU1YjViNQBGAAAAAACuqO6r_QtETboIxVr3j6RqBwCjug_wz-R6Todrtnv-DjDjAAFVAJ0tAACjug_wz-R6Todrtnv-DjDjAAFjiRnyAAA= 
<1245030876.6227.1601931248831@hf-release-compute-6df579d978-slvcx> 
2020-11-09T17:42:12Z

Expected behavior

Batch request should execute successfully

Actual behavior

Getting error response

Response{protocol=http/1.1, code=400, message=Bad Request, url=https://graph.microsoft.com/v1.0/$batch}
{
 "error": {
  "code": "BadRequest",
  "message": "Request Id AAMkADdmOWY2MDdiLTBiZjktNDJlMi05NDliLWJmMDkzNmU1YjViNQBGAAAAAACuqO6r_QtETboIxVr3j6RqBwCjug_wz-R6Todrtnv-DjDjAAFVAJ0tAACjug_wz-R6Todrtnv-DjDjAAFjiRnyAAA= has to be unique in a batch.",
  "innerError": {
   "date": "2020-11-13T18:36:46",
   "request-id": "234800b0-fb02-4a9c-87fa-30a1311d52fe",
   "client-request-id": "db6b4347-5bc5-4460-9523-24aff5061e52"
  }
 }
}

Steps to reproduce the behavior

Request emails in the same batch which ids is different only in character cases.

dsemelianov commented 1 month ago

Hello, we are experiencing the same issue. What was the resolution here?

In our case, the error is complaining about a request ID which is not even present in the batch request

Ndiritu commented 1 month ago

@dsemelianov thanks for reaching out. Is your use-case the same? Where you intially fetch email IDs, then build a batch request using them?

Please share a code sample if possible for us to determine if it's potentially an SDK bug or API issue.

microsoft-github-policy-service[bot] commented 1 month ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.