Forum Discussion
sgsmittal
May 05, 2020Copper Contributor
CreateChannel in GraphAPI sometimes results in not creating the corresponding Sharepoint/OneDrive
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 resp...
Jo_77
May 19, 2020Copper Contributor
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".
sgsmittal
Jun 09, 2020Copper Contributor
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
- ymanatosJan 27, 2021Copper Contributor
sgsmittal said "I solved it for now by creating folder/driveitem in sharepoint document library after the success api call to create channel"
Hello, can you please elaborate on how exactly you solved it, i.e. using GraphAPI or else?
I urgently need a solution to this problem (standard channel, application permissions) and I hope that your solution might will work for me as well.
- Tony190587Dec 20, 2021Copper ContributorHey, any update on it. I got the same issue, not sure how to solve it.
- sgsmittalDec 21, 2021Copper Contributor
Hi Tony190587
it is still same issue. for a solution i did some R&D and got same api microsoft team is using when we open file tab of that channel. they also basically keep polling to check if sharepoint drive is created or not until it actually got provisioned. this api also force to initiate the process.
https://teams.microsoft.com/api/mt/apac/beta/teams/19:zQvMk13crHaerrweKYJAZOCTfuEVdG4VjFXl1VlPzEU1@thread.tacv2/files/documentlibrary?channelId=19:e8d10dr4rrewre8443b3b2718dfec394b8b8@thread.tacv2
but you will need to generate skypeaccesstoken and x-skypetoken header to call this api
- ChowdaryKaruturiJun 19, 2020Copper Contributor
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.
- jdmacdaddyJun 18, 2020Copper Contributor
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.
- jdmacdaddyJun 18, 2020Copper Contributor
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.
- Abhijit_MSFTJun 29, 2020
Microsoft
jdmacdaddy, This is known issue. We are working on it.
Currently there is no workaround for this.