Office 365 Small Business "Sideloading of apps is not enabled on this site"

Written by MMMan on. Posted in Development, PowerShell, SharePoint

I began working on a new Office 365 site I had just created, and wanted to use Visual Studio to add an app to the site (using the Visual Studio deployment mechanism).  Unfortunately, I ran into the following error when I tried to run a “deploy” of the app.

“Sideloading of apps is not enabled on this site”

After a bit of pain sifting through the Google on the Internet box, I came across the following forum post on MSDN,  In that post, there’s a perfect little section of PowerShell that allows you to specify your Office 365 site and credentials, and will then enable the feature for you.

Below is a copy of the code you’ll need to put into a “.ps1” file on your local machine.  Note you’ll also need a copy of the “Microsoft.SharePoint.Client.dll” somewhere – so you can run this script from another SharePoint server, alternatively, you can get the SharePoint Online Management Shell (local install on your dev machine) which is exactly where the code below will expect to find the file, or if you have a copy of the DLL on your machine locally, that works too, just change the path to the file in the code.


$programFiles = [environment]::getfolderpath("programfiles")
add-type -Path $programFiles'\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll'
Write-Host 'To enable SharePoint app sideLoading, enter Site Url, username and password'

$siteurl = Read-Host 'Site Url'
$username = Read-Host "User Name"
$password = Read-Host -AsSecureString 'Password'

if ($siteurl -eq '')
   $siteurl = ''
   $username = ''
   $password = ConvertTo-SecureString -String 'mypassword!' -AsPlainText -Force
$outfilepath = $siteurl -replace ':', '_' -replace '/', '_'

   [Microsoft.SharePoint.Client.ClientContext]$cc = New-Object Microsoft.SharePoint.Client.ClientContext($siteurl)
   [Microsoft.SharePoint.Client.SharePointOnlineCredentials]$spocreds = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)

   $cc.Credentials = $spocreds<br>&nbsp;&nbsp;&nbsp;&nbsp; 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, $true, [Microsoft.SharePoint.Client.FeatureDefinitionScope]::None);
   Write-Host -ForegroundColor Green 'SideLoading feature enabled on site' $siteurl

   #Activate the Developer Site feature
   Write-Host -ForegroundColor Red 'Error encountered when trying to enable SideLoading feature' $siteurl, ':' $Error[0].ToString();


When run, my output looked similar to the following.

PS C:\Windows\system32> C:\scripts\EnableDevOnO365.ps1
To enable SharePoint app sideLoading, enter Site Url, username and password
Site Url: ****
User Name: ****
Password: ****
SideLoading feature is not enabled on the site:

DefinitionId       :
Context            : Microsoft.SharePoint.Client.ClientContext
Tag                :
Path               : Microsoft.SharePoint.Client.ObjectPathMethod
ObjectVersion      :
ServerObjectIsNull :
TypedObject        : Microsoft.SharePoint.Client.Feature

SideLoading feature enabled on site

This script nicely enabled the necessary feature for me, and then I was able to deploy my solution to my Office 365 site.

Incoming search terms:

  • sharepoint online sideloading apps

Trackback from your site.


Colin is a two-time SharePoint MVP and Consultant with over 15 years’ experience from both an information technology and software development background. He’s spent the past several years in the world of SharePoint, and has been involved with various software and infrastructure projects throughout his career.

Comments (3)

  • Marlou


    Thanks for the script! It worked very well but I got one errormessage about line 24 ”   &nbsp”. I guess something went wrong while making the blog post :)


  • Rob Pearmain


    Excellent Post, once I removed the   from the script it ran fine


  • amin


    I ran this script successfully, but i receive the error yet :((


Leave a comment