1

We are getting 400 API error on some of the files when we try to download them using below API:

 https://graph.microsoft.com/v1.0/users/<user-id>/drive/items/<item-id/content

API doc : https://learn.microsoft.com/en-us/graph/api/driveitem-get-content?view=graph-rest-1.0&tabs=http

Error:

"error": {
"code": "invalidRequest",
"message": "One of the provided arguments is not acceptable.",
"innerError": {
  "code": "badArgument",
...

Same API calls works for most of the files, but we are getting this error recently. Kindly let me know What's the reason behind it? and how can we fix?

ShahtajK
  • 117
  • 10
  • Try with the role as write and not edit. It worked for me. – Dev Jan 04 '21 at 11:11
  • Let me know if this helps. – Dev Jan 04 '21 at 11:11
  • @Dev You mean application permission for Files right? If we select File.Read.All, will we be able to reproduce this ? Actually my current app permission are already set to File.ReadWrite.All. – ShahtajK Jan 05 '21 at 06:53
  • @Dev Also, when the file is shared, it has the rights to either "edit and view". there is no "write" role in the options. – ShahtajK Jan 05 '21 at 07:02

0 Answers0