Set filepath of created folder/file in OneDrive

Richard Jackson 46 Reputation points
2021-04-09T14:07:46.797+00:00

Hi there, this is INCREDIBLY basic so please forgive my ignorance but:

How can I modify the filepath for a POST request to write a file/folder to OneDrive?

At present the below will write to the root directory of OneDrive:

{
"name": "Foo",
"folder": {}
}

However, how would I make create a folder in a path such as "Documents\Foo"?

I've just been playing around with it in Graph Explorer but can't work it out.

Thanks!

Rich

OneDrive Management
OneDrive Management
OneDrive: A Microsoft file hosting and synchronization service.Management: The act or process of organizing, handling, directing or controlling something.
1,116 questions
0 comments No comments
{count} votes

Accepted answer
  1. Emi Zhang-MSFT 21,626 Reputation points Microsoft Vendor
    2021-04-12T05:35:36.067+00:00

    Hi @RichardJackson-9148,
    I suggest you try to post this issue to OneDrive for Developer forum:

    https://techcommunity.microsoft.com/t5/onedrive-developer/bd-p/OneDriveDeveloper

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.


    If the response 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.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Richard Jackson 46 Reputation points
    2021-04-12T09:05:48.9+00:00

    Hi there,
    Thank you for this - I will do so, much appreciated!
    I'll put a link to my reposting in a comment when I've done so.
    Rich
    EDIT: post is now here: https://techcommunity.microsoft.com/t5/onedrive-developer/set-filepath-of-created-folder-file-in-onedrive/m-p/2268199#M65

    0 comments No comments