Hi, I try to build a flow which creates a new folder in my OneDrive. To get an easy start, I just used the mobile button.
As there is no "create a folder oin OneDrive" action, I thought about a HTTP action. I registered an app in Azure AD, gave permissions and initialialized variables TenantID, App ID, App Secret because need them in my http action.
I also initalized a variable for "me":
in Microsoft Graph i used this to get my ID:
and got this response:
I wrote this ID into a variable called "me".
My flow looks like this:
Flow runs perfectly without error messages - BUT!
It doesn't create a new folder in my onedrive but in SharePoint:
translation: Freigegebene Dokumente = Shared Documents
this is the URL:
When I try to create a folder in my onedrive directly with MS Graph using POST method the folder is created in my OneDrive.
I don't understand the problem - anybody who has some kind of idea?
Thanks,
Luise
Solved! Go to Solution.
@LuiseFreese if you already have your user's ID and facing issues with calling /me/ directly form Flow, maybe try using /users/ instead? So then your request should call the following URL:
https://graph.microsoft.com/v1.0/users/YOUR-ID/drive/root/children
And body as you wrote, e.g.:
{
"name": "Test2",
"folder":{}
}
Best regards,
Tomasz
Hi @LuiseFreese are you going to do something with Folder once it's been created i.e. putting something in there as part of this Flow or is it simply to create a Folder?
If you're going to put a document in there, the action of Create File in OneDrive for Business will ask you to provide a Folder. If the Folder doesn't exist, it will create it, and will then create the document in there.
If you're only going to create a folder, I suppose a less elegant way of doing it, but without the hassle of App IDs etc, would be to create a File to force the creation of the folder, and then delete the file straight away leaving the folder empty.
I'll have a look at the Graph call in the morning to see if I can recreate the issue and to see what might be causing it.
Proud to be a Flownaut!
Community Leader: Black Country PowerApps & Flow User Group
@LuiseFreese if you already have your user's ID and facing issues with calling /me/ directly form Flow, maybe try using /users/ instead? So then your request should call the following URL:
https://graph.microsoft.com/v1.0/users/YOUR-ID/drive/root/children
And body as you wrote, e.g.:
{
"name": "Test2",
"folder":{}
}
Best regards,
Tomasz
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
87 | |
57 | |
41 | |
37 | |
33 |
User | Count |
---|---|
88 | |
70 | |
63 | |
58 | |
39 |