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...
jdmacdaddy
Jun 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.
jdmacdaddy
Jun 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.
- BastianJohnSep 14, 2020Copper Contributor
Abhijit_MSFT any news? 3 months later and the issue is still there in private channels.
- Jan van der HeideOct 22, 2020Brass Contributor
@Abhijit_MSFT any new yet?
- RoelVBSep 02, 2020Copper Contributor
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.
- ChowdaryKaruturiSep 02, 2020Copper Contributor
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.
- sgsmittalJun 28, 2020Copper Contributoryes jdmacdaddy I solved it for public channel but I think we can do same thing for private channel. I will give it a try