Deploying App in SharePoint Online - Sideloading of apps is not enabled on this site.

Its the era of Office 365 and cloud  now. On a fine day, you learned to develop app. The app is developed in Visual Studio and you are planning to deploy in your SharePoint Online site.

  • You created the developer's site
  • Developed the App
  • Then tried to deploy the App.....


Error occurred in deployment step 'Install app for SharePoint': Sideloading of apps is not enabled on this site.

Now What??? Then comes the PowerShell scripts for your rescue.....

Execute the following PowerShell scripts. 

$programFiles = [environment]::getfolderpath("programfiles")
add-type -Path $programFiles'\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll'
Write-Host 'Ready to enable Sideloading'
$siteurl = Read-Host 'SiteUrl'
$username = Read-Host "UserName"
$password = Read-Host -AsSecureString 'Password'
$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
    $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();


Give the Site URL, Administrator Username & Password. And then it says, "Sideloading feature is enabled on site".


Popular posts from this blog

Authenticating SharePoint with Multi Factor Authentication using PnP PowerShell

Resource file not found for SharePoint Application