9/3/2018 11:15 PM Cloud Roadshow © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO.

Slides:



Advertisements
Similar presentations
Development models for on-premises Transformation approaches Farm solution considerations.
Advertisements

App development in SharePoint 2013 LIVE Introducing Cloud App Model Cloud-hosted Apps Experiences from the Field.
Office 365 Platform Flexible Tools Understand different provisioning options and their advantages and disadvantages…
Feature: Print Remaining Documents © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Cloud Roadshow. Getting Started with Office add-ins.
Cloud Roadshow. Getting Started with mobile app development with the Office 365 APIs.
Advanced SQL Azure Database Name Title Microsoft Corporation.
Cloud Roadshow. Advanced SharePoint add-in Development.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Cloud Roadshow. Getting Started with the Office 365 APIs.
05 | Integrating JavaScript and MVC 4 Jon Galloway | Tech Evangelist Christopher Harrison | Head Geek.
Cloud Roadshow. Advanced Web Development using Angular with Office 365 APIs.
Course Agenda Deep Dive into the Building Blocks and Services of the SharePoint Platform Module 1: Developing Advanced Workflow Scenarios in Office 365.
O SharePoint 2013 Remote Event Receivers Speaker.
Office 365 Development July 2014.
1/10/2018 9:33 PM Cloud Roadshow © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO.
Demand Management and Workflow
Integrating SharePoint 2010 with Office 2010
Office 365 Developer Overview
Office 365 development CloudRoadShow 5/20/ :25 AM
About Bill Bill Baer (ˈbɛər)
Remote Event Receivers
9/11/ :51 AM Cloud Roadshow © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO.
Office 365 Development July 2014.
6/17/2018 5:54 AM OSP322 Getting the best of both worlds, making the most of SharePoint hybrid search solutions Shyam Narayan Microsoft © 2013 Microsoft.
SPC Developer 6/25/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Microsoft Virtual Academy
Customize Office 365 Search and create result sources
SharePoint Online Development Best Practices
Возможности Excel 2010, о которых следует знать
SharePoint Online Management and Control
Office 365 Development.
Transforming SharePoint Farm Solutions to the Add-in Model
SharePoint Designer 2010: Top 10 Things To Know
Setting up team development infrastructure for SharePoint 2013
Office 365 Development July 2014.
TechEd /21/2018 5:20 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Office 365 Development.
SPC2012 – IT-Pro 11/30/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Build /2/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /4/2018 3:19 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Windows Azure Keenan Newton 3-021
Excel Rest API Sudhi Ramamurthy Program Manager, Office Extensibility
02 | Controlling branding in SharePoint using app model
Microsoft Virtual Academy
A Day in Developer Life (Office 365/SharePoint) Ashish Trivedi PRD322.
Office 365 Development July 2014.
Agenda OAuth Concepts Programming OAuth.
SPC Developer 1/1/2019 Deep Dive on the Capabilities of SharePoint Online's New Public Website Josh Stickler Program Manager WCM Kevin Gjerstad Principal.
Hooking into Apps for SharePoint
Jim Nakashima Program Manager Cloud Tools
TechEd /11/ :54 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
03 | Site collection and site provisioning with app model
Getting Started with SP2013 Apps
Office 365 Development.
Visual Studio 2010 SharePoint Development Tools Overview
TechEd /22/2019 9:22 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Office 365 Development.
2/27/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Microsoft Office 4/3/2019 Deep Dive into native Universal App development with the Office 365 APIs Speaker name Title Microsoft Corporation © 2012 Microsoft.
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Explore PnP Partner Pack for IT pros, admins and architects
TechEd /27/2019 5:37 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
The complete developer's guide to the SkyDrive API
Day 2, Session 2 Connecting System Center to the Public Cloud
Office 365 Development July 2014.
Office 365 Development.
PnP Partner Pack - Introduction
Presentation transcript:

9/3/2018 11:15 PM Cloud Roadshow © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Advanced SharePoint add-in Development

Agenda Introduction Programming in C# Remote Event Receivers 9/3/2018 11:15 PM Agenda Introduction Programming in C# Remote Event Receivers Remote “Jobs” and Provisioning © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Developer vision USERS DATA HTML

Introduction

Cloud Architecture Azure Web Sites SharePoint Online Host Web App Web SQL Azure Azure Web Sites CSS png aspx master js Azure Data Market SharePoint Online Host Web App Web

On-Premises Architecture Databases Internet Information Server CSS png aspx master js Web Services SharePoint 2013 Host Web App Web

Add-in Permissions Remote web always has full rights to add-in web Microsoft Office 9/3/2018 Add-in Permissions Remote web always has full rights to add-in web Add-in permissions are the lesser of user and add-in permissions to the given resource Provider-hosted add-ins can utilize “app-only” permissions to “elevate” privileges. © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

App-Only Permissions Considers add-in permissions only, ignores user Microsoft Office 9/3/2018 App-Only Permissions Considers add-in permissions only, ignores user Set AllowAppOnlyPolicy to true in add-in manifest Get an app-only token © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Creating Provider-Hosted Add-ins Microsoft Office 9/3/2018 Creating Provider-Hosted Add-ins Web Project ASP.NET Web Forms MVC 5 Authorization Azure Access Control Services Server-to-Server High Trust Programmability SharePointContextProvider class Managed CSOM or REST JavaScript Cross-Domain Library © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Microsoft Office Creating a Provider-Hosted Add-in 9/3/2018 demo Creating a Provider-Hosted Add-in © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Programming in C#

SharePointContextProvider Class Microsoft Office 9/3/2018 SharePointContextProvider Class Checks for valid Context Token Redirects if it does not exist Simplifies the management of context Provides an ACS or STS context Context exposes properties for key values like Host Web URL Simplifies the management of tokens Context exposes methods to retrieve tokens © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Validating Context Token Microsoft Office 9/3/2018 Validating Context Token Web Forms MVC 5 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Managing SharePoint Context Microsoft Office 9/3/2018 Managing SharePoint Context SharePointContextProvider GetSharePointContext Returns SharePointAcsContext in cloud Returns SharePointHighTrustContext on premises Properties SPAppWebUrl SPClientTag SPHostUrl SPLanguage SPProductNumber © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Managing Security Tokens Microsoft Office 9/3/2018 Managing Security Tokens CSOM CreateAppOnlyClientContextForSPAppWeb CreateAppOnlyClientContextForSPHost CreateUserClientContextForSPAppWeb CreateUserClientContextForSPHost REST AppOnlyAccessTokenForSPAppWeb AppOnlyAccessTokenForSPHost UserAccessTokenForSPAppWeb UserAccessTokenForSPHost © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Managed CSOM

Managed REST Microsoft Office 9/3/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Remote Event Receivers

Remote Event Handlers Event Handler code runs in remote web Microsoft Office 9/3/2018 Remote Event Handlers Event Handler code runs in remote web Deployed as web service in remote web Two-way events “Before” events (a.k.a, “ING” events) Synchronous call Supports a return value One-way events “After” events (a.k.a, “ED” events) Asynchronous call No return value © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Supported Events Site List List Schema List Item App Create X Update Delete Move Check-In Uncheck-In Check-out Attachments File Move/Convert Install Uninstall

Adding a Remote Event Receiver Use the “Add New” dialog For Site, List, Item, and Schema events Use the “Properties” dialog for App events

IRemoteEventService Must be implemented by the remote web service

SPRemoteEventProperties Passed to web service in response to event Provides contextual information Supports reading and updating user inputs Allows for data validation

SPRemoteEventResult Returns by two-way events Allows events to be cancelled Allows status to be returned

Registering Events Receivers CAML Element for Lists, Items, Sites, Schema events App Manifest for App events

Debugging Considerations Microsoft Office 9/3/2018 Debugging Considerations Remote Event Receivers might require Azure Service Bus to support debugging Create a Service Bus Namespace Copy the Connection String into the SharePoint Project Properties © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Microsoft Office Remote Event Receivers 9/3/2018 demo Remote Event Receivers © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Remote “Jobs” and Provisioning

Remote “Jobs”…Authentication Microsoft Office 9/3/2018 Remote “Jobs”…Authentication SharePointOnlineCredentials Run with a service account that will operate with permissions of the account char[] pwdChars = ConfigurationManager.AppSettings["AccountPassword"].ToCharArray(); System.Security.SecureString pwd = new System.Security.SecureString(); for (int i = 0; i < pwdChars.Length; i++)     pwd.AppendChar(pwdChars[i]); ClientContext cc = new ClientContext(siteUri); cc.AuthenticationMode = ClientAuthenticationMode.Default; cc.Credentials = new SharePointOnlineCredentials(ConfigurationManager.AppSettings["AccountUsername"], pwd); ClientContext Runs with the permissions defined in the app permissions //Get the realm for the URL string realm = TokenHelper.GetRealmFromTargetUrl(siteUri); //Get the access token for the URL.  Requires this app to be registered with the tenant string accessToken = TokenHelper.GetAppOnlyAccessToken(TokenHelper.SharePointPrincipal, siteUri.Authority, realm).AccessToken; //Get client context with access token using (var clientContext = TokenHelper.GetClientContextWithAccessToken(siteUri.ToString(), accessToken)) { © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Remote “Jobs”…Authentication Microsoft Office 9/3/2018 Remote “Jobs”…Authentication AppInv.aspx Used to grant permissions to an application without a User Interface Application must first be registered via AppRegNew.aspx Copy Permissions block from manifest into “App’s Permission Request XML” field © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Provisioning Options/Comparison 9/3/2018 Provisioning Options/Comparison Site Definition No Office365 Long term impact on costs Blocks transition to cloud Causes significant issues with future migration and upgrade Site Templates Poor site collection creation story Negative impact on upgrades Causes additional maintenance costs with service updates Not with publishing features Web Templates Poor site collection creation story Causes maintenance costs with service updates SP Server side provisioning Provision oob sites, but modify them based on user selection and requirements Standardization of site creation in code No Office365 Remote provisioning CSOM supports creation of site collections for on-premises and cloud Standardization of site creation in code Can be done from any external system Options Support in cloud Options available Good Fair Average Good Excellent Cost impact (short and long term) © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Site Collection Creation from add-ins SMSG Readiness 9/3/2018 Site Collection Creation from add-ins What Provision new site collections from add-in side Why Can be used to override out–of–the–box self-service site collection creation form Can be used to integrate additional functionalities as part of the provisioning How Office365 has separate downloadable that includes the needed CSOM elements to provision sites After 2014 April CU, natively supported for on-prem as well. © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Async provisioning model SharePoint Service Provider Hosted add-ins 2 1 3 4 6 https://contoso.sharepoint.com /sites/site Remote timer job 5

Provisioning time logic Initial provisioning based on the out of the box site. Usually either team site or publishing site. Assets are uploaded from the provisioning engine using CSOM/REST 3 Project site 1 2 Remote timer job 3 Organizational Assets and configuration Branding Images Master Pages Page Layouts Other settings Apply the needed changes (configurations etc.) on top of the out of the box site based on the user selection. This is the specialization part, but since we start from oob site, we always get the latest improvements to it as a base line. 3 Workgroup

Summary Introduction Programming in C# Remote Event Receivers 9/3/2018 11:15 PM Summary Introduction Programming in C# Remote Event Receivers Remote “Jobs” and Provisioning © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Further reading… SharePoint Code Samples SharePoint Training videos & hands on labs SharePoint documentation

Developer Program Launch E-mail Newsletters Free Training Free Tools Webinars Free Developer Subscription 1 YEAR FREE http://dev.office.com/devprogram

Podcasts http://dev.office.com/podcasts Engage Office 365 Network https://www.yammer.com/itpronetwork S t a r @OfficeDev Twitter Podcasts http://dev.office.com/podcasts Stack overflow [ms-office] Channel 9 Dev Show http://aka.ms/O365DevShow Snack Demos http://aka.ms/o365DevSnackDemos UserVoice http://officespdev.uservoice.com/