Enabling SideLoading in SharePoint Online for Non-Developer Site
Note 1: By default this feature is enabled in “Developer Site”. So if your site has been created with the “Developer Site” template then do not use this article since this is for non-developer sites.
Note 2: Enabling this feature is not recommended for production sites. Sideloading apps is insecure. The main reason for blocking sideloading by default on non-developer sites is the risk that faulty apps pose to their host web/host site collection. Apps have the potential to destroy data and make sites or, given enough permissions, can even make site collections unusable. Therefore, apps should only be sideloaded in dev/test environments and never in production.
(Referenece: Apps for Office and SharePoint blog)
Pre-requisites
Note 2: Enabling this feature is not recommended for production sites. Sideloading apps is insecure. The main reason for blocking sideloading by default on non-developer sites is the risk that faulty apps pose to their host web/host site collection. Apps have the potential to destroy data and make sites or, given enough permissions, can even make site collections unusable. Therefore, apps should only be sideloaded in dev/test environments and never in production.
(Referenece: Apps for Office and SharePoint blog)
Pre-requisites
- Install Windows PowerShell from Windows Management Framework (I installed the Windows Management Framework 3.0).
- Then install “SharePoint Online Management Shell” Link.
Procedure
- Execute a PowerShell script in any desktop not requiring a SharePoint Server (of course that’s the purpose of SharePoint Online).
- Be sure you enable “ExecutionPolicy” in the client desktop where your PowerShell will be executed.
- Open “SharePoint Online Management Shell” with “Run as Administrator” and execute Set-ExecutionPolicy RemoteSigned
Screenshot for reference only, - Now execute the PowerShell from “SharePoint Online Management Shell”.
- The PowerShell script is provided here and also attached to the article.
Code- $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 'Site Url'
- $username = Read - Host "User Name"
- $password = Read - Host - AsSecureString 'Password'
- $outfilepath = $siteurl - replace ':', '_' - replace '/', '_'
- try {
- [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);
- $cc.ExecuteQuery();
- Write - Host - ForegroundColor Green 'SideLoading feature enabled on site'
- $siteurl#Activate the Developer Site feature
- } catch {
- Write - Host - ForegroundColor Red 'Error encountered when trying to enable SideLoading feature'
- $siteurl, ':'
- $Error[0].ToString();
- }
- Now you are all ready to deploy your apps into the SharePoint Online Site.
ReplyDeleteTravel to India in air-conditioned comfort to visit one of the world's most iconic monuments. The Taj Mahal is probably the best known monument to love that was ever built.
GOLDEN TRIANGLE TOUR 3 DAYS 2 NIGHTS
GOLDEN TRIANGLE TOUR 4 DAYS 3 NIGHTS
GOLDEN TRIANGLE TOUR 5 DAYS 4 NIGHTS
GOLDEN TRIANGLE TOUR WITH AJMER PUSHKAR
GOLDEN TRIANGLE WITH RANTHAMBORE JAIPUR DELHI
TAJMAHAL SUNRISE TOUR
TAJ MAHAL SAME DAY TOUR
For more information
Thank & Regard
Vicky
Visit our website https://www.goldentajtours.com/
Email : goldentajtours2@gmail.com
phone : +919997349090, +919897070013,+918395877144