how to enable the copy and paste feature for the folders created in one drive using graph rest api

vignesh babu 20 Reputation points
2026-02-05T13:30:07.37+00:00

i am creating a environment (web application, backend server and outlook addin) using the technologies like react and nodejs. i am using the graph rest api to access the features of emails, one drive and todo lists. Now i am creating one drive folders in a specific user's one drive account who is an user of Microsoft 365 account. And i am creating a sharing link (sharepoint) of a folder present in his one drive using graph api and sending it to the users. the users can access the folders and files present in the one drive using the links (in web browser). they can also able to upload and downnload files. But when i try to copy a file from one folder and paste it in another folder (in the browser - onedrive ui), i cant able to do it and it throws error (1 or more errors occurred). Even though i am sharing the parent folder, configuring the create one drive folder (type: edit, access: anonymous) still i cant be able to copy/paste file. I create a parent folder and i create a service folder whenever i open the addin in my outlook calendar for the first time. How to handle this issue and what are the necessary configurations i need to do for allowing the copy/paste option when the user access the one drive link via web browser?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-02-05T13:30:22.6433333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To enable the copy and paste feature for folders in OneDrive using the Microsoft Graph API, ensure that the permissions for the user and the shared items are correctly configured. Here are some key points to consider:

    1. Permissions: Ensure that the user has the appropriate permissions to copy items. For delegated permissions, the least privileged permission for copying files is Files.ReadWrite. If you are using application permissions, Files.ReadWrite.All is required. Make sure that the permissions are granted and consented for your application.
    2. Sharing Links: When creating sharing links for folders, ensure that the link type allows for editing. You mentioned you are creating a sharing link with type edit and access anonymous. This should allow users to edit the contents, but verify that the link is correctly configured and that users have access to the parent folder.
    3. Conflict Behavior: When copying items, you can specify the @microsoft.graph.conflictBehavior parameter to handle conflicts. This parameter can be set to fail, replace, or rename. Make sure to handle conflicts appropriately based on your application's requirements.
    4. Error Handling: If you encounter errors when copying files, check the error messages for specific details. Common issues could include insufficient permissions or trying to copy items that are not allowed due to sharing settings.
    5. Testing in Graph Explorer: Use the Graph Explorer to test your API calls and ensure that the copy functionality works as expected with the correct permissions and parameters.

    By ensuring that the permissions are set correctly and that the sharing links are configured for editing, you should be able to enable the copy and paste functionality for folders in OneDrive.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.