May 05 2020 06:40 AM
Currently the creation of a channel through the Graph API frequently results in the relative, corresponding Sharepoint folder not being created.
When using the Graph API to create a channel the response indicates creating the channel was a success, but when going to the files tab it shows:
"Your files can’t be found, working on it to restore them."
After having clicked on the files tab in the Teams UI, the folder is created eventually (after a couple of minutes).
But because automated processes depend on the channel folder, we don’t want to ask the user to manually open the team before the other processes can continue.
So: Team created: Ok -> Channel created: Ok-ish (But missing the linked folder) -> One-drive/share point folder, with the name of the channel: Not created
Sometimes the folder is created properly, but lately more often it is not created (Not even after 3-4 days of waiting) until the user opens the files tab in the Teams client.
This behaviour is new since it worked flawlessly until a week ago. Is there a known workaround for this?
May 05 2020 11:23 PM
@sgsmittal When you create channel using graph api, the current behavior is to visit "Files" and then corresponding SharePoint will be created. let me check.
May 06 2020 08:10 AM - edited May 06 2020 08:15 AM
Hi @Abhijit_MSFT,
Hope you are doing good
Sure but that will impact the automated process as we have to provision folders as well under file tab in the process (we create team -> then channels -> then folder structure under file tab)
but due to above issue when we try to get files tab Folder using graph api we get error share point folder not found. we can't ask user to visit file tab of each channel as everyday there will lot of team be created automatically with folder structure.
Is there any api using that I can force to create the folder in Sharepoint if that is a current behavior ?
May 19 2020 06:28 AM
@Abhijit_MSFT We're also trying to provision a team through Graph API. Requirement is to create tabs on a few channels that will display documents, but that's not currently possibly as the Folder associated with the Channel does not get created so we can't copy the corresponding documents in to the Team. This happens both when the channel is created via a JSON call to /teams with the team template in the body, and when the channel is created via a call to /teams/{teamId}/channels.
Querying /teams/{teamId}/channels/{newChannelId}/filesFolder after channel creation returns a 404 Not Found error: "Sharepoint folder not found".
Jun 09 2020 12:32 PM
@Jo_77 @Abhijit_MSFT I solved it for now by creating folder/driveitem in sharepoint document library after the success api call to create channel
Jun 18 2020 09:39 AM
@sgsmittal How were you able to get the document library ID programmatically? Sometimes after a private channel is created, I can't even get the site ID of the channel, which is needed to get the document library ID.
To get the site, I'm using:
var destinationDrive = await graphClient.Sites.GetByPath($"sites/{channelSitePath}", hostname).Drive
.Request()
.GetAsync();
This is equivalent to the HTTP call:
GET {{baseUrl}}/{{beta}}/sites/{{hostName}}:/sites/{{privateChannelPath}}
I get the following response:
{
"error": {
"code": "itemNotFound",
"message": "Requested site could not be found",
"innerError": {
"date": "YYYY-MM-DDTHH:MM:ss",
"request-id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}
}
Only after clicking the Files tab in the channel does the site get provisioned. Then I am able to get the site, similar to your experience.
Jun 18 2020 10:25 AM
@sgsmittal I see now that you are creating a standard (public) channel and not a private channel. Private channels essentially create a new site, but it seems to be a similar issue. The site doesn't get created until you click on the Files tab of the private channel.
Jun 19 2020 05:53 AM
Hello @sgsmittal, we are having the same problem, is there a way to solve this problem. We would want to programatically create the SharePoint site instead of a user manually clicking on the files.
Thank you,
Chowdary Karuturi
Jun 19 2020 05:59 AM
@sgsmittalcan you please let us know how did you create a folder/drive and linked it to the private channel ? Any help on this is appreciated.
Jun 28 2020 04:14 PM
Jun 28 2020 09:37 PM
@jdmacdaddy, This is known issue. We are working on it.
Currently there is no workaround for this.
Jul 31 2020 04:36 AM
@sgsmittal Hi, can you please explain a bit more what you have done as workaround? thanks
Aug 08 2020 08:42 AM
@sgsmittal Did you find a way to create the underlying SP Site without manually clicking on the files tab ? We have a similar situation where we create a bunch of teams/channels programmatically and we dont wanted to click on the files tab manually.
Sep 02 2020 01:45 AM
@Abhijit_MSFT Is there any update on this.
I've experienced that visiting the files tab as member doesn't work.
In more details. We create a private channel using the GraphAPI, the files tab doesn't work, even if it's opened by a member. Only after opening it as an owner it started working.
Sep 02 2020 01:49 AM
@RoelVBYes, same for me.
User clicking the Files tab should be Owner of channel, doing that with a member doesn't work.
Sep 02 2020 06:09 AM
@Abhijit_MSFT : Please let us know if there is an API that we can call to provision the SharePoint site, we create multiple private channels everyday and we had to manually click on the Files tab which is a pain.
Sep 14 2020 04:25 AM
@Abhijit_MSFT any news? 3 months later and the issue is still there in private channels.
Oct 07 2020 02:30 PM
Curious if somebody has found a solution. Have a use case where I want to migrate on-prem content with ShareGate (content only jobs) to private channels of newly provisioned teams, have been doing some research, but did not find a solution yet.
Strange thing is however: if you have created (Graph calls) a private channel, going to files tab triggers creation of dedicated site collection ... any additional private channels you create via Graph calls also immediatly result in creation of site collections ...
[realy need a good answer ... I do not want to go through pain to open 1500-ish Teams, let alone also the pain in making user account owner, opening files, removing account ...]
Oct 07 2020 02:33 PM
And ... route to provision new sitecollection with TEAMCHANNEL#0 template, won't work .. you are not allowed to use this template.
[I do create folders in default site collection, f.e. general and for other channels, this to ensure ShareGate is able to copy content to these folders].