-
I would like to enable MS Teams for a specific group connected site collection. Basically running these 2 cmdlets:
The user account ($creds) has Global and SharePoint Administrator role. And it is owner of corresponding SharePoint site and M365 group. However, corresponding folder for "General" channel is not created in DocLib of linked SharePoint site. In one of the new nightly builds of PnP.PowerShell there is a new cmdlet called Get-PnPTeamsChannelFilesFolder, which should trigger creation of corresponding channel folder and linking to SharePoint. I was using version 1.10.55. It creates the channel folder in the DocLib, but there is an error icon next to it saying "There was an error retrieving this channel's SharePoint URL.". Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
There is a general issue when enabling MS Teams for a site, which contains spaces (%20) in URL. I guess the spaces are stripped when creating sites in SharePoint UI, however, it is possible with PowerShell. This should be prevented when creating a new site, especially if it is connected to a 365 group. Just mentioning here, if someone experiences the same issues as I did. |
Beta Was this translation helpful? Give feedback.
-
Wow what a terrible design. Thank you @maeni70 I am doing some automation around templatizing teams for a project and ran into this issue. There was a space in the private channel name. I was actually able to get around the issue by just going to 'files' tab, that must initiate something in the background that allows for the document library to initialize on the private site. What a joke. That obviously won't work for automation, so I will use your suggestion. Thanks ! I was looking for a way to initialize it via Graph but no luck. Actually no, it is not working. The URLs for the SharePoint doc libraries do not get instantiated unless I go to the 'files' tab, then everything starts working. This was through new-mgteamchannel, new-teamchannel. So I thought I would try Add-PnPTeamsChannel and it works. Eff me Microsoft get your shit together! For gods sake NOTHING works seamlessly wiht Graph, PowerShell. Edit: No, it is still not working. |
Beta Was this translation helpful? Give feedback.
-
I hope this helps someone. I spent way too many hours on this, but to get the SharePoint document libraries to initialize via automation, without initialization through the 'files' tab. Run the following cmdlet: Get-MgTeamChannelFileFolder -TeamId $team.GroupId -ChannelId $channel.id This apparently triggers the creation of hte library and filesFolderwebUrl. |
Beta Was this translation helpful? Give feedback.
-
Hi All, Just to speed this up the following commands builds out the URL's on mass for a team. I had a large number of Channels created via code and needed to get the File Libraries created.
Note: You may get an error "Folder location for this channel is not ready yet, please try again later." - just rerun the script. I hope this help others? |
Beta Was this translation helpful? Give feedback.
There is a general issue when enabling MS Teams for a site, which contains spaces (%20) in URL. I guess the spaces are stripped when creating sites in SharePoint UI, however, it is possible with PowerShell. This should be prevented when creating a new site, especially if it is connected to a 365 group. Just mentioning here, if someone experiences the same issues as I did.