Forum Discussion
CreateChannel in GraphAPI sometimes results in not creating the corresponding Sharepoint/OneDrive
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
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, 2020Former Employee
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.
- 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