question

JatishKhanna-5917 avatar image
0 Votes"
JatishKhanna-5917 asked 35247258 edited

Graph API DriveItem Copy Operation - Copied Resource ID on Accepted #12897

In many cases, the copy action is performed asynchronously. The response from the API will only indicate that the copy operation was accepted or rejected. We get a resource monitor URL upon accepting the request but doesn't provide the resource ID unless completed is completed

<image>

I am assuming flow would be ->
Copy Request -> Request Accepted -> Create a temporary DriveItem -> (on complete) Place the file and generate metadata

Is it possible to get the resourceId as soon as the Copy DriveItem operation is accepted, otherwise a client also has to process it async or blocking.

<image>





ID: 50d5f74c-db0c-2039-cab6-04db509f996d
Version Independent ID: e70d49fb-aa7a-1800-2161-ff988832c197
Content: Working with long running actions (beta) - Microsoft Graph
Content Source: concepts/long-running-actions-overview.md
Product: non-product-specific
Technology: microsoft-graph
GitHub Login: @daspek
Microsoft Alias: MSGraphDocsVteam
Github issue: details


microsoft-graph-files
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.

1 Answer

MichaelHan-MSFT avatar image
0 Votes"
MichaelHan-MSFT answered

Hi @JatishKhanna-5917,

The short answer is No.

It's by design that the copy actions in Graph api are implemented using a long running actions pattern. Quoted from the article: https://docs.microsoft.com/en-us/onedrive/developer/rest-api/concepts/long-running-actions?view=odsp-graph-online

121648-image.png


If an Answer is helpful, please click "Accept Answer" and upvote it.
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.



image.png (32.6 KiB)
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.