Uploading list template to modern site

IMK 581 Reputation points
2021-05-12T07:39:37.047+00:00

Hi

We have a classic site, which holds a list that we need to move to another modern site. The modern site is a group site with Teams team linked.

I can create a template of the list in the classic site, and in classic site in Site Settings -page, I can see List Templates -link under Web Designer Galleries. From there, I am able to download the .stp file.

Problem here is that when I go to Site Settings of the modern site, where we need to move the list, I can't see List Templates -link. If I use the List Templates URL of my modern group site (http://company.sharepoint.com/sites/group.site/_catalogs/lt/Forms/AllItems.aspx), I can access the List Template Gallery, but when I try to upload the list template, I get error message "Sorry, you don't have access.".

I have Full Control, I am owner of the modern site and I have direct Designer permission. Still I can't see the List Templates -link in Site Settings and get the error that I don't have access..

What is wrong here?

Below is a screen shot of my permissions in the modern site.

95939-permissions.png

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Emily Du-MSFT 51,846 Reputation points Microsoft External Staff
    2021-05-13T03:15:17.12+00:00

    @IMK

    Please run below PowerShell as administrator to enable custom script in the SharePoint Online site collection.

    #Config Parameters  
    $AdminSiteURL="https://tenant-admin.sharepoint.com/"  
    $SiteURL="site collection URL "  
      
    $Cred = Get-Credential  
    Connect-SPOService -URL $AdminSiteURL -Credential $Cred  
      
    Set-SPOSite -Identity $SiteURL -DenyAddAndCustomizePages $False  
    

    If an Answer is helpful, please click "Accept Answer" and upvote it
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. IMK 581 Reputation points
    2021-05-13T07:28:23.957+00:00

    Hi

    I tried PowerShell but no go. Below what I came up with.

    PS C:\WINDOWS\System32> Get-SPOSite -Identity $SiteURL -Detailed | select DenyAddAndCustomizePages  
      
    DenyAddAndCustomizePages  
    ------------------------  
                     Enabled  
      
      
    PS C:\WINDOWS\System32> Set-SPOSite $SiteURL -DenyAddAndCustomizePages $False  
    Set-SPOSite : https://company.sharepoint.com/sites/group.team is a Groups site collection. The valid parameters for thi  
    s type of site collection are '-Identity', '-AllowSelfServiceUpgrade', '-DefaultLinkPermission', '-DefaultSharingLinkTy  
    pe', '-DenyAddAndCustomizePages', '-DisableCompanyWideSharingLinks', '-DisableSharingForNonOwners', '-LockState', '-Own  
    er', '-ResourceQuota', '-ResourceQuotaWarningLevel', '-SandboxedCodeActivationCapability', '-SharingCapability', '-Show  
    PeoplePickerSuggestionsForGuestUsers', '-SocialBarOnSitePagesDisabled', '-StorageQuota', '-StorageQuotaReset', and '-St  
    orageQuotaWarningLevel'.  
    At line:1 char:1  
    + Set-SPOSite $SiteURL -DenyAddAndCustomizePages $False  
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
        + CategoryInfo          : NotSpecified: (:) [Set-SPOSite], ServerException  
        + FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.SetSi  
       te  
      
    PS C:\WINDOWS\System32> Set-SPOSite $SiteURL -DenyAddAndCustomizePages 0  
    Set-SPOSite : https://company.sharepoint.com/sites/group.team is a Groups site collection. The valid parameters for thi  
    s type of site collection are '-Identity', '-AllowSelfServiceUpgrade', '-DefaultLinkPermission', '-DefaultSharingLinkTy  
    pe', '-DenyAddAndCustomizePages', '-DisableCompanyWideSharingLinks', '-DisableSharingForNonOwners', '-LockState', '-Own  
    er', '-ResourceQuota', '-ResourceQuotaWarningLevel', '-SandboxedCodeActivationCapability', '-SharingCapability', '-Show  
    PeoplePickerSuggestionsForGuestUsers', '-SocialBarOnSitePagesDisabled', '-StorageQuota', '-StorageQuotaReset', and '-St  
    orageQuotaWarningLevel'.  
    At line:1 char:1  
    + Set-SPOSite $SiteURL -DenyAddAndCustomizePages 0  
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
        + CategoryInfo          : NotSpecified: (:) [Set-SPOSite], ServerException  
        + FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.SetSi  
       te  
      
    PS C:\WINDOWS\System32>  
    

    ----

    Also, I checked Sharepoint Admin Center Settings and found that custom scripting should be enabled already. Below screen shot shows the situation what it has been all the time. I haven't changed those settings.

    96216-nayttokuva-2021-5-13-kello-102639.png


  3. IMK 581 Reputation points
    2021-05-14T08:55:51.01+00:00

    You can find the commands and results in my previous answer??

    It is straight copy from PowerShell window and show's the commands that I used and results I got.


  4. IMK 581 Reputation points
    2021-05-14T12:27:59.12+00:00

    Hi

    It didn't help.

    PS C:\WINDOWS\system32>  Install-Module -Name Microsoft.Online.SharePoint.PowerShell  -Force
    PS C:\WINDOWS\system32> Connect-SPOService
    
    cmdlet Connect-SPOService at command pipeline position 1
    Supply values for the following parameters:
    Url: https://company-admin.sharepoint.com
    
    PS C:\WINDOWS\system32> $SiteURL="https://company.sharepoint.com/sites/group.team"
    PS C:\WINDOWS\system32> Get-SPOSite -Identity $SiteURL -Detailed | select DenyAddAndCustomizePages
    
    DenyAddAndCustomizePages
    ------------------------
                     Enabled
    
    
    PS C:\WINDOWS\system32> Set-SPOSite $SiteURL -DenyAddAndCustomizePages $False
    Set-SPOSite : https://company.sharepoint.com/sites/group.team is a Groups site collection. The valid parameters for thi
    s type of site collection are '-Identity', '-AllowSelfServiceUpgrade', '-DefaultLinkPermission', '-DefaultSharingLinkTy
    pe', '-DenyAddAndCustomizePages', '-DisableCompanyWideSharingLinks', '-DisableSharingForNonOwners', '-LockState', '-Own
    er', '-ResourceQuota', '-ResourceQuotaWarningLevel', '-SandboxedCodeActivationCapability', '-SharingCapability', '-Show
    PeoplePickerSuggestionsForGuestUsers', '-SocialBarOnSitePagesDisabled', '-StorageQuota', '-StorageQuotaReset', and '-St
    orageQuotaWarningLevel'.
    At line:1 char:1
    + Set-SPOSite $SiteURL -DenyAddAndCustomizePages $False
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-SPOSite], ServerException
        + FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.SetSi
       te
    
    PS C:\WINDOWS\system32> Set-SPOSite $SiteURL -DenyAddAndCustomizePages 0
    Set-SPOSite : https://company.sharepoint.com/sites/group.team is a Groups site collection. The valid parameters for thi
    s type of site collection are '-Identity', '-AllowSelfServiceUpgrade', '-DefaultLinkPermission', '-DefaultSharingLinkTy
    pe', '-DenyAddAndCustomizePages', '-DisableCompanyWideSharingLinks', '-DisableSharingForNonOwners', '-LockState', '-Own
    er', '-ResourceQuota', '-ResourceQuotaWarningLevel', '-SandboxedCodeActivationCapability', '-SharingCapability', '-Show
    PeoplePickerSuggestionsForGuestUsers', '-SocialBarOnSitePagesDisabled', '-StorageQuota', '-StorageQuotaReset', and '-St
    orageQuotaWarningLevel'.
    At line:1 char:1
    + Set-SPOSite $SiteURL -DenyAddAndCustomizePages 0
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-SPOSite], ServerException
        + FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.SetSi
       te
    
    PS C:\WINDOWS\system32>
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.