question

Steve-4848 avatar image
0 Votes"
Steve-4848 asked ZehuiYaoMSFT-7151 edited

Bad Request (More Details)

I have an integration built with the microsoft graph API. In our internal testing, it appears to work fine but with some user accounts, we are seeing 400 responses with the body being the following:

 {
 reason: Bad Request
 }

Is there any way to retrieve the reason for the 400 error so as to help diagnose the issue? Since it works on our test account, we can't determine why there is an error without more fine-grained error responses.

microsoft-graph-applications
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Actually I see the request-id in the response. Is there anywhere I can query for more details with this request-id to diagnose the error?

0 Votes 0 ·
ZehuiYaoMSFT-7151 avatar image
0 Votes"
ZehuiYaoMSFT-7151 answered ZehuiYaoMSFT-7151 commented

Hello @Steve-4848, firstly, you can refer to the documentation on error messages to diagnose the problem. In addition to that, you can describe your needs and the API you are using, and we can help you analyze the cause of the error. Or you can also open a support ticket and a backend engineer can give you more details. Hope this helps you.



If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @Steve-4848, did the answer above help you? please comment here if you have any questions about this issue.

0 Votes 0 ·

Right so in this case the server responded with the following:

 {
 'error': {
 'code': 'invalidRequest', 
 'innerError': {
 'client-request-id': 'XXXX', 
 'date': '2022-05-10T16:17:05', 
 'request-id': 'XXXX'
 }, 
 'message': 'Invalid request'
 }
 }


i"invalidRequest" is not enough to diagnose the issue. There are no field level validations or any diagnostic information to speak of. The documentation simply says: "The request is malformed or incorrect."

However the same call works on our test account so its very difficult to diagnose without more information.

0 Votes 0 ·

Hello @Steve-4848, would you mind providing the API you are using?

0 Votes 0 ·
Steve-4848 avatar image
0 Votes"
Steve-4848 answered ZehuiYaoMSFT-7151 edited

Also, how do I submit a ticket? This page does not show any way to submit a ticket: https://developer.microsoft.com/en-us/graph/support

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.