Migrating Full-Trust Solutions to the Cloud Scot Hillier [email protected] @ScotHillier.
-
Upload
esmond-marsh -
Category
Documents
-
view
220 -
download
3
Transcript of Migrating Full-Trust Solutions to the Cloud Scot Hillier [email protected] @ScotHillier.
![Page 2: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/2.jpg)
Scot Hillier
[email protected]@ScotHillier
www.itunity.com/users/scot-hillier
www.criticalpathtraining.com
www.microsoftvirtualacademy.com/Studies/SearchResult.aspx?q=hillier
channel9.msdn.com/Search?term=hillier#ch9Search
www.pluralsight.com/search/?searchTerm=hillier
![Page 3: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/3.jpg)
Apologizing in advance
Out with the old… In with the new…
Apps for SharePoint SharePoint Add-Ins
App Web Add-In Web
App Part Add-In Part
SharePoint App Model SharePoint Add-In Model
Apps for Office Office Add-Ins
Office App Model Office Add-In Model
![Page 4: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/4.jpg)
Branding Provisioning Sandbox Solutions SharePoint Add-Ins v Office 365 APIs
Agenda
![Page 5: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/5.jpg)
Branding
![Page 6: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/6.jpg)
The challengesEmerging bias against branding collaboration sitesDo you brand Word? Office 365 as suite-level experience.
Avoiding custom master pagesMicrosoft will modify functionality without notice
SharePoint online public sites discontinuedExisting public sites expire in 2017. New customers don’t get the capability
![Page 7: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/7.jpg)
Branding TechniquesThemesCustom colors and fonts
Alternate CSSOverride colors fonts and layouts
Display TemplatesSearch results
JavaScript InjectionJSLinkUser custom actionsScript web parts
![Page 8: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/8.jpg)
ThemingOffice 365 themesBrand the entire suite
Site themesOut-of-the-box themes
Create custom themeSharePoint Color Palette Toolhttps://www.microsoft.com/en-us/download/details.aspx?id=38182
![Page 9: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/9.jpg)
Setting themeMicrosoft.SharePoint.Client.ListItem themeEntry = ...
web.ApplyTheme(themeEntry["ThemeUrl"] as FieldUrlValue, themeEntry["FontSchemeUrl"] as FieldUrlValue, themeEntry["ImageUrl"] as FieldUrlValue, false);
web.MasterUrl = (themeEntry["MasterPageUrl"] as FieldUrlValue); web.Context.ExecuteQuery();
![Page 10: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/10.jpg)
Alternate CSSUsed to override OOB CSS settingsControl to color, fonts and even layout settings Configuration applied to each siteUtilize the new CSOM capabilities to set
![Page 11: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/11.jpg)
Setting alternate CSS and logo
$http({ url: "https://spsboston/_api/web", method: "POST", headers: { "accept": "application/json", "contentType": "application/json", "X-RequestDigest": digest, "X-HTTP-Method": "MERGE", "content-length": 84 }, data: { "AlternateCssUrl": "https://spsboston/SiteAssets/contoso.css", "SiteLogoUrl": "https://spsboston/SiteAssets/pnp.png" }});
![Page 12: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/12.jpg)
Display TemplatesAllow search results display to be changedOOB support in CBS, refinement, and search resultsCreate custom display templates for branding
![Page 13: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/13.jpg)
![Page 14: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/14.jpg)
JavaScript injection methodsScript editor web partSimply drop on page and add script
Scripting user custom actionInject script into the site as a user custom action
JSLinkAssociate JavaScript to modify a site, list, or field
![Page 15: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/15.jpg)
Script Editor Web Parts
![Page 16: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/16.jpg)
Adding User Custom Actions to a Siteexecutor.executeAsync({ url: "../_api/SP.AppContextSite(@target)/web/usercustomactions" + "?@target='" + hostWebUrl + "'", method: "POST", body: JSON.stringify({ 'Sequence': 0, 'Description': 'CDNManager', 'Location': 'ScriptLink', 'ScriptBlock': script }), headers: "content-type": "application/json", "accept": "application/json", "X-RequestDigest": jQuery("#__REQUESTDIGEST").val() }, success: function (data) {...}, error: function (err) {...} })
![Page 17: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/17.jpg)
Utilizing JSLink(function () { // Initialize the variables for overrides objects var overrideCtx = {}; overrideCtx.Templates = {}; // Override field data overrideCtx.Templates.Fields = { // PercentComplate = internal name of the % Complete // View = you want to change the field rendering of a view // <dev ... = here we define what the output of the field will be. 'PercentComplete': { 'View': '<div class="progress" ... ' } }; // Register the override of the field SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx); })();
![Page 18: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/18.jpg)
JavaScript injection challengesMultiple references to JavaScript librariesEach developers making their own references
References to different versions of the same libraryOld references are never updated
JSLink references with multiple web partsAffects all list of the same template type
![Page 19: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/19.jpg)
Demo
JavaScript Injection with CDN Manager
![Page 20: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/20.jpg)
Provisioning
![Page 21: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/21.jpg)
Provisioning Techniques
SharePoint Add-In Office 365 APIs PowerShell
![Page 22: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/22.jpg)
Provisioning with an Add-In
SharePoint Online
Host Web
Add-In Web
Azure Web Sites
CSS
png
aspx
master
js
New/Existing Sites and Webs
![Page 23: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/23.jpg)
Provisioning with Office 365 APIs
SharePoint OnlineAzure Web Sites
CSS
png
aspx
master
js
New/Existing Sites and Webs
![Page 24: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/24.jpg)
Provisioning with PowerShell
SharePoint OnlinePowerShell Client
j
New/Existing Sites and Webs
![Page 25: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/25.jpg)
PnP Provisioning EngineSupports the extraction of sites into a template fileSupports applying the template to new sitesPowerShell cmdletsConnect-SPOnlineGet-SPOProvisioningTemplate –Out filename.xmlApply-SPOProvisioningTemplate –Web https://company.sharepoint.com –Path filename.xml
NuGet packagesOfficeDev PnP CoreOfficeDev PnP Core V15
![Page 26: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/26.jpg)
Demo
PnP Provisioning Engine
![Page 27: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/27.jpg)
Sandbox Solutions
![Page 28: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/28.jpg)
What are Sandboxed Solutions?
Site Collection Solutions Gallery
Proxy Process(SUCWorkerProcessProxy.exe)
Worker Service
(SPUCWorkerProcess.exe)
Full Object Model
Host Services (SPUCHostService.exe)
Subset Object Model
Untrusted Code
User CodeService
Declarative Items:
• Web Templates• Lists and Libraries• Site Columns and
Content Types• File deployment• Custom Actions• Client Code
![Page 29: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/29.jpg)
Sandboxed Solutions
The Good Customize SharePoint
without a farm solution: Declarative Features (lists,
libraries, files, client side code)
User Code (web parts, InfoPath forms, event receivers, workflow actions)
Multi-tenant friendly
The Bad and the Ugly Limited server side API Provisioned content is brittle Versioning is a black art No central way to manage,
update Scalability Problems
While they still work for the time being, it’s best to
Avoid all use of Sandboxed Solutions
![Page 30: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/30.jpg)
What does it all mean?The future of Sandboxed Solutions is in doubtProbably worse than “in doubt”
User code is deprecated and may be removed at any timeNo support for programmatic elements
Avoiding declarative CAML elementsUpdates are difficult and inconsistent. Orphans sometimes left behind.
Consider other approaches
![Page 31: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/31.jpg)
Add-Ins v Office 365 APIs
![Page 32: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/32.jpg)
SharePoint Add-In ChallengesTightly coupled to SharePointAdd-Ins need to be installed to a SharePoint site for app authentication
Global rollout of an app is problematicTenant-scoped installs appropriate sometimes, but not always..
User experience is constrainedUser must access from SharePoint
Little support for native device apps
![Page 33: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/33.jpg)
Office 365 API BenefitsTruly standaloneGlobally accessible within Office 365App Launcher and My Apps page
Integrated with Office 365 authenticationSSO with Azure AD
Open ArchitectureDevelop with .NET, JavaScript, iOS, Android libraries – or use the REST API
![Page 34: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/34.jpg)
Office 365 API capabilities
Mail Contacts Calendar
Files Users & groups
Discovery Service
![Page 35: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/35.jpg)
Included in Office 365 Subscription
Users & Groups managed in Office 365 PortalChanges persisted in Azure AD
Azure Active Directory (Azure AD)
![Page 36: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/36.jpg)
Single auth flow for Office 365Azure AD Graph, Exchange, SharePointDevice apps and web sitesAdmin and end-user consent
Secure protocolOAuth 2.0No capturing user credentialsFine-grained access scopesSupports MFA and federated user sign-inLong-term access through refresh tokens
Azure AD OAuth in Office 365
![Page 37: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/37.jpg)
37
Application TypesCustom developedThird-party, published in the gallery
Office 365 SharePoint, ExchangeDynamics CRMThousands of others
Custom ApplicationsWeb Application and/or WebAPI Native Client
Application Registration
![Page 38: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/38.jpg)
38
Connected Services in Visual Studio
![Page 39: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/39.jpg)
Implicit Flow and Angular JSADAL.JS, ADAL-ANGULAR.JSSpecifically designed to work with Angular applications
Implicit FlowAppropriate for JavaScript apps that cannot defend a Client SecretMust explicitly enable explicit flow in the Azure manifest
![Page 40: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/40.jpg)
Demo
Implicit Flow with ADAL.JS
![Page 41: Migrating Full-Trust Solutions to the Cloud Scot Hillier scot@scothillier.net @ScotHillier.](https://reader035.fdocuments.net/reader035/viewer/2022062715/56649d765503460f94a57e5c/html5/thumbnails/41.jpg)
ReferencesOffice Dev Centerhttp://dev.office.com/
Patterns and Practices Sampleshttps://github.com/OfficeDev/PnP/tree/master/Samples
Articles on IT Unityhttp://www.itunity.com/users/scot-hillier
CDN Managerhttps://github.com/OfficeDev/PnP/tree/master/Solutions/Core.CDNManager
SharePoint Color Palette Toolhttps://www.microsoft.com/en-us/download/details.aspx?id=38182
PnP PowerShell Cmdletshttps://github.com/OfficeDev/PnP/tree/master/Binaries/PowerShell.Commands