Forum Discussion

hunk0227's avatar
hunk0227
Brass Contributor
Mar 29, 2022

Why Private channel can't change the url

Hello,

 

I was trying to rename the URL address of the teams site which has several private channels.

However, it looks like my changes is not cascaded thru the private channel. (teamsite-private channel)

Looking to the AdminCenter is see no options to edit URL even no avail in powershell command.

 

Can someone shed a light why we cannot change private channel URL or any ideas if it is possible?

 

Thank you!

Hunk

 

 

 

9 Replies

  • emalden's avatar
    emalden
    Copper Contributor

    hunk0227 

    As of July 2024, this still can't be done through the UI, but if you have the https://learn.microsoft.com/en-us/powershell/sharepoint/sharepoint-pnp/sharepoint-pnp-cmdlets library installed, you can use the can use https://pnp.github.io/powershell/cmdlets/Rename-PnPTenantSite.html PowerShell command (run as admin). 

     

    Caveats - it takes time to rename (you'll get a 404 initially, but the URL works eventually) and the Files tab in Teams goes wonky. If you add a post with a file, the tab fixes itself. 

  • Theo_Vermaak's avatar
    Theo_Vermaak
    Copper Contributor
    Hi

    So I found this handy script and it seemed to work for me.

    #Set Parameters
    $AdminCenterURL="https://crescent-admin.sharepoint.com"
    $SiteURL = "https://crescent.sharepoint.com/sites/suppliers"
    $NewSiteURL = "https://crescent.sharepoint.com/sites/vendors"
    $NewSiteTitle = "Vendors"

    #Connect to SharePoint Online
    Connect-SPOService -Url $AdminCenterURL -Credential (Get-Credential)

    #Get all site collections
    $Sites = Get-SPOSite -Limit All | Select -ExpandProperty URL

    If($Sites -notcontains $NewSiteURL)
    {
    #Rename SharePoint Online site URL using PowerShell
    Start-SPOSiteRename -Identity $SiteURL -NewSiteUrl $NewSiteURL -NewSiteTitle $NewSiteTitle -Confirm:$false
    }
    Else
    {
    Write-Host "New Site URL '$NewSiteURL' is not available!" -f Yellow
    }

    When you are done you can rename the private channel in Teams to what ever you need it to be.

    • LexPage23's avatar
      LexPage23
      Copper Contributor

      Hi Theo_Vermaak - could you provide more information on how you used the Script or where you found it please? E.g. where & how to run it, what permissions are required. Also could I confirm that the script does what the original requestor asked - changing the URL of the private channels within the SharePoint site (not changing the name of the private channels or changing the SharePoint site URL.)

      Thank you in advance,

      Lex

      • hunk0227's avatar
        hunk0227
        Brass Contributor
        @lexPages, This still an issue with the Microsoft and has no fix at the moment so let's live with this setup unfortunately. 😞
        I guess the one suggested by Theo was to rename the Root site url and does not reflect to the private channel (e.g "sites/vendors-PrivateChannel"). Tried also rename directly the private channel but no avail getting the write locked error.

        Start-SPOSiteRename : Error Code: -105,This site address can't be changed.
        This site is write locked.
    • ShimonD's avatar
      ShimonD
      Copper Contributor
      What are you referencing? The roadmap item is for renaming the folder associated with the Teams Channel, not the URL
    • Chen_Wang's avatar
      Chen_Wang
      Copper Contributor
      HI MS Team,
      I got the same issue, how can I change the private channel URL? Thanks.
    • hunk0227's avatar
      hunk0227
      Brass Contributor
      Thanks Andres this helps. I can't wait with this updates be release. 🙂

Resources