'Is there an API endpoint to find the drive of a private channel

We are looking into creating teams in our organization with prefilled folder structures in the files tab.

For normal channels this is easy, because the files lay in a directory named after the channel in the root SharePoint of the group. So we can do POST requests to the https://graph.microsoft.com/beta/groups/{group-id}/drive/items/root/children endpoint and create the folders for the channels. The answer from the endpoint contains the ID of the new folders and we can move forward creating the folder structures for the channels using this id.

Private channels however are located outside the groups SharePoint.

The question is, is there a possibility to get the root of the drive with the information provided by the https://graph.microsoft.com/beta/teams/{id}/channels POST call which creates the private channel?



Solution 1:[1]

The issue you are having is that the drive and site for the private channel is never generated until you actually visit the channel in the teams app. That one visit will trigger the creation of the drive and site. Im stuck here myself as i cannot trigger a private channel to created the SharePoint site and drive until i actually open the teams app and visit the channel.

Solution 2:[2]

Currently /filesFolder for Private Channels returns BadGateway

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jimmy
Solution 2 AJIXuMuK