onedrive-api-docs: `generalException` when copying a file without providing a new name

Category

  • Question
  • Documentation issue
  • Bug

Expected or Desired Behavior

When copying a file and omitting "name", original file name is used, as specified in the documentation.

Observed Behavior

Copy operation is Accepted (202), but monitor endpoint reports:

{
  "@odata.context": "https://{domain}-my.sharepoint.com/personal/{username}/_api/v2.1/$metadata#drives('default')/operations/$entity",
  "id": "{operationId}",
  "status": "failed",
  "error": {
    "code": "generalException",
    "message": "General exception while processing"
  }
}

Steps to Reproduce

I could not find a way to get the copy to work without providing "name", so the steps are just:

POST https://graph.microsoft.com/v1.0/users/{username}/drive/items/{itemId}/copy

{
  "parentReference": {
    "driveId": "{driveId}",
    "id": "{parentItemId}"
  }
}

^ This fails.

POST https://graph.microsoft.com/v1.0/users/{username}/drive/items/{itemId}/copy

{
  "parentReference": {
    "driveId": "{driveId}",
    "id": "{parentItemId}"
  },
  "name": "foo"
}

^ This works with the same IDs, just "name" added.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 40 (18 by maintainers)

Most upvoted comments

Yes, we are using app-only tokens for our use case.

Hi @ificator ,

That’s correct, in my case I use app token.

request-id of the request that starts the copy operation: 72c137c5-5de7-461d-9294-9d2f2bf232eb request-id of a request to the monitor endpoint that returns the generalException: ad7ab69e-30c5-7000-7d75-d1aaff818424