Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Creating a new folder in a newly created Team/SharePoint document library fails


I got a question concerning Microsoft Flow/PowerAutomate and the creation of folders within the document library of a newly generated team in Microsoft Teams.



1. Within Microsoft flow I create a new team with the Microsoft Graph "Clone a team"-command based on my team-template with the exemplary id: "f17cff1c-4da7....". For example:




  "displayName": "Example",

  "description": "Exampl-Descriptuon",

  "mailNickname": "TestMailNickname",

  "partsToClone": "apps,tabs,settings,channels,members",

  "visibility": "public"


- and it just works fine. The new team based on the template is created.


2. Then I want to create a folder in the new SharePoint document library of the newly created team.

- Therefor I have to get a few ids, for example the “drive id”, based on the newly created groups id. For example






1. With the above mentioned “GET Drive” command I get the following error.


  "error": {

    "code": "itemNotFound",

    "message": "The resource could not be found.",

    "innerError": {

      "request-id": "90d21f45-7db6-454a-a460-e9c7761cd390",

      "date": "2020-01-09T16:02:24"

    }  }  }


2. But if I:

a.) create a delay in Microsoft Flow, before the above mentioned “GET Drive” command starts

b.) Open the newly created Microsoft team manually by browsing to it

c.) Open the "Files" Tab in the General Channel of the newly created team.

d.) Get an "Error" that the "Files aren't accessible at the moment”. (See screenshot)











e.) Open the "Files" Tab once again,

f.) I can see the available SharePoint root folder “General”. (see screenshot)












3. If I did the above mentioned manually actions within time before the "GET Drive" Command in Flow starts, I get a successful 200 response from the "GET Drive" Command with a body like



  "@odata.context": "$metadata#groups('e81b7b1f-2601-43d5-8e1c-a1bc7c3e6666')/drive/root...",

  "createdDateTime": "2020-01-07T11:11:28Z",

  "eTag": "\"{BC4CB7A8-3B3D-469A-8ZBE-9047F2EF49AE},1\"",


  "lastModifiedDateTime": "2020-01-07T11:11:28Z",

  "name": "General",




that contains the ids I need for creating folders in it.


4. Then I use the "Create a new folder in a drive" command. For example:!HkE4eVN_l0KBXm4BKBWvtIKfr8Bn82356Dk6xR-JBBvim_gu079SwvTpVX...



  "name": "New Folder",

  "folder": {} }


- And it just works fine getting a 201 response.



1. Somehow it seems, that the drive is only created/accessible after I opened the document library of the newly created team within Microsoft Teams one time manually.



1. Is there a possibility to simulate my manual opening of the newly created document library?

2. Or is there another known way to create a folder within this document library of the newly created team?


Thanks in advance.


Community Support
Community Support

Hi @COlsch ,


I don't think it is possible to simulate manual open of the new created document library.


Best regards,



Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regular Visitor

I am running most likely into the same problem. My scenario is that I do create successfully a channel through the Graph API. But the SharePoint folder is indeed missing (while it will immediately created if I go to the 'Files' tab in the Teams App).
Any suggestions if this can be realized such that I can place as part of the channel creation some initial content within the newly created folder?
I was thinking the other way round - catching the moment the folder is being created in a Flow action. But that looks at least an enormous effort as each team has its own SharePoint site and the Power Automate trigger has a SharePoint site scope. 

Helpful resources

MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (2,336)