Forum Discussion
kaz01
May 03, 2023Brass Contributor
Error retrieving this channel's SharePoint URL
Hi Community, Any ideas how I can fix this error message? I wasn't able to find anything in the discussion threads. I added 3 channels to an existing team in MS Teams. Team has a SharePoint s...
luunk
May 08, 2024Copper Contributor
What we have discovered during our testing is that when you create at private channel with GraphAPI. The permissions of the SharePoint site does not populate automatically. What happens is that when a user presses the "file tab" in Teams of the newly created private channel, the MS backend some how starts to create the SharePoint site for the private channel. The thing is, and here it gets tricky, is that if it's NOT the owner of the private channel who clicks on the file tab in teams. The creation of the private SharePoint area fails because the backend is trying to use the owner permissions to create it. (Is my theory at least).
So when a normal member presses the file tab the first time, the backend tries to use the owners permissions (the owner on top of the owner list in teams) to create the file area. And since the normal member is not the same person as the top owner, the creation fails. This will also fail if there are multiple owners of the private channel. And if it's not the owner at the top of the list that presses the file tab first then it will fail in the same way.
How we have solved it is that when a private channel is created by Graph API we only assign one owner to the team and no one else. When the owner get the file area working (by just pressing the file tab) they starts to invite the other persons who should be part of the team.
So when a normal member presses the file tab the first time, the backend tries to use the owners permissions (the owner on top of the owner list in teams) to create the file area. And since the normal member is not the same person as the top owner, the creation fails. This will also fail if there are multiple owners of the private channel. And if it's not the owner at the top of the list that presses the file tab first then it will fail in the same way.
How we have solved it is that when a private channel is created by Graph API we only assign one owner to the team and no one else. When the owner get the file area working (by just pressing the file tab) they starts to invite the other persons who should be part of the team.
- Billyn20Sep 16, 2024Copper Contributor
There are a cmdlets for both Graph and PnP mentioned here: https://github.com/pnp/powershell/discussions/2021 that will initialise the private channel library.
I have tested with the PnP cmdlet and my Team sites created through the API no longer get this error.