2

I'm trying to make a colleagues life easier by enabling app side-loading for a test / dev site that was created specifically for that colleague.

We're talking about SharePoint 365 Online, and I feel including the current year (2019) is important; I've found many articles on the subject, but there are inconsistencies between them; it seems the requirements and the process might have changed over the years.

First, there's the issue of the "side-load" feature ID, which seems to be different from tutorial to tutorial, and I can't find an official source on this. Some sites suggest the GUID for this is AE3A1339-61F5-4f8f-81A7-ABD2DA956A7D while others suggest this is e374875e-06b6-11e0-b0fa-57f5dfd72085. The fact that this is enabled via some "magic GUID" doesn't fill me with confidence either.

The most common method of enabling this seems to be a somewhat complex Powershell script. The script, unfortunately, doesn't seem to work and seems ot be outdated. There's the, very helpful, PnP Powershell module that seems to have what I need (Enable-PnPFeature command), but running this returns nothing, and nothing happens (I've tried it with both GUIDs and my colleague still can't side-load apps from their Visual Studio).

Finally, out of desperation, I've tried using the Get-PnPFeature to confirm if the feature even showed up; it did not. Additionally, the command never returns the DisplayName of the features, making any sort of identification very difficult.

It seems to me that all the articles on this are somewhat outdated. Does anyone know how to enable side-loading in current SharePoint online sites?

1

2 Answers 2

0

So I found this old article with a script to do the job, but it was a bit overcomplicated and seemed like some syntax was old / wrong - as Powershell was breaking even before executing for me.

This is what I did in my Windows 10 PowerShell:

  1. execute Set-ExecutionPolicy RemoteSigned as they said in the article
  2. Install SharePoint Online Management Shell as they suggested
  3. I created a shorter version of the script and executed it:
    <# $adminUPN="[email protected]"
    $adminURL = "https://myorg-admin.sharepoint.com"
    $orgName="myorgsite.onmicrosoft.com"
    $userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
    Connect-SPOService -Url $adminURL -Credential $userCredential
    #>

    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
    
    $adminUPN = "[email protected]"
    $secureCredential = ConvertTo-SecureString "myAdminPassword" -AsPlainText -Force
    
    $SiteURL = "https://myorgsite.sharepoint.com"
    
    [Microsoft.SharePoint.Client.ClientContext]$cc = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL);
    [Microsoft.SharePoint.Client.SharePointOnlineCredentials]$spocreds = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($adminUPN, $secureCredential); 
    $cc.Credentials = $spocreds
    $sideLoadingEnabled = [Microsoft.SharePoint.Client.appcatalog]::IsAppSideloadingEnabled($cc);  
    $cc.ExecuteQuery()
    
    if($sideLoadingEnabled.value -eq $false) {  
            Write-Host -ForegroundColor Yellow "SideLoading feature is not enabled on the site: $($SiteURL)"  
            $site = $cc.Site;  
            $sideLoadingGuid = new-object System.Guid "AE3A1339-61F5-4f8f-81A7-ABD2DA956A7D"  
            $site.Features.Add($sideLoadingGuid, $false, [Microsoft.SharePoint.Client.FeatureDefinitionScope]::None); 
            $cc.ExecuteQuery();  
            Write-Host -ForegroundColor Green "SideLoading feature enabled on site $($SiteURL)"  
    }  
          
    Else {  
            Write-Host -ForegroundColor Green 'SideLoading feature is already enabled on site'  
    }  

I left the first section of the script within comments as I'm not sure if the script worked because I first executed that bit and logged into SharePoint, or it actually just works without the code in the comments section, so you can try it out by executing the code in the comments section first (this is just to make a secure session with your SharePoint online administration site).

I created a sample Add-in solution in Visual Studio 2019 and it works fine, and publishes to my site as it should.

-1

Side loading is controlled by the hidden feature EnableAppSideLoading, so you need Powershell access to check if the feature is enabled on the site collection (and enable it).

You can refer to the article below:

https://blogs.msdn.microsoft.com/officeapps/2013/12/10/enable-app-sideloading-in-your-non-developer-site-collection/

1
  • This was the first post I found on the subject, but it's from 2013, the script doesn't work and is still based on some mysterious, hidden GUID (which I've tried using the, much easier to use, PnP PS tools). None of these things fill me with confidence with regards to modern day SharePoint online.
    – MBender
    Jul 8, 2019 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.