68
Building end-to-end apps for SharePoint with Windows Azure and Windows 8 Rob Howard, Donovan Follette Sr. Program Manager, Sr. Technical Evangelist 3-022

Building end-to-end apps for SharePoint with Windows Azure and Windows 8

  • Upload
    jera

  • View
    89

  • Download
    6

Embed Size (px)

DESCRIPTION

Building end-to-end apps for SharePoint with Windows Azure and Windows 8. Rob Howard, Donovan Follette Sr. Program Manager, Sr. Technical Evangelist 3-022. Agenda. Demo end-to-end solution Introduction to _ api Meet the new App Principal Remote Event Receivers. Key Takeaway. - PowerPoint PPT Presentation

Citation preview

Page 1: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Building end-to-end apps for SharePoint with Windows Azure and Windows 8Rob Howard, Donovan FolletteSr. Program Manager, Sr. Technical Evangelist3-022

Page 2: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Demo end-to-end solutionIntroduction to _apiMeet the new App PrincipalRemote Event Receivers

Agenda

Page 3: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

With the new cloud app model for SharePoint and its rich service APIs, your apps can now consume SharePoint better than ever before.

Key Takeaway

Page 4: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Scenario Overview

Business:Company wishes to create a mobile enabled toolset for sales personnel to efficiently respond to sales leads and win business

Technical:Company wants a 100% cloud-based solution and use desktop applications and mobile devices to access the toolset

Page 5: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Windows 8 Application

Microsoft Word with Apps For Office

Internal O365 SharePoint Site

Windows Azure Cloud Services

Windows Azure Workflow Server

Public O365 SharePoint Site Windows

Azure SQL Database

Clients (Desktop/Tablet/Mobile)

Cloud

• View / approve SOWs• Display Excel Services

charts in Word

• View client companies• View sales leads• Receive toast and tile

and raw notifications• View Excel Services

charts• Create estimates

• Contact internal sales personnel to follow up on requests for quotes

• Contact vendors to follow up on requests for quotes

• Approve SOWs• Display, Create, Update,

Delete Sales Leads• Store Excel Documents• Store SOWs• Host team sites for projects• BCS External List

• Submit requests for quote

• Send notifications• Create SOWs• Update data in Excel

documents• Create SharePoint project

sites

• Facilitate SOW creation, approval, submission, and follow up tasks

• Store sales request data

Windows AzureAccess Control Service• OAuth

Page 6: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Demo using Windows 8, Windows Azure SQL Database, Web Sites and Access Control Services

Lead Tracking app for SharePoint Online

Page 7: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Introduction to _api

Page 8: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Introducing the all new _api

_APIClient/Server/Mobile Symmetrical

OAuth Enabled2,000+ Classes

Declarative, Remote EventsFully Remote

6,000+ MembersODataJQuery Compatible

Private and Public Clouds

JSON

Page 9: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

JavaScript Library

Silverlight Library

.Net CLR Library

Custom Client Code

ClientSharePoint

_api

SharePoint Foundatio

n

Execute Query

SharePoint 2013 and SharePoint Online _api

OData / REST

User Profile

Search

Taxonomy Feeds More…

Page 10: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Consistent Access to ServicesAPI REST URL Script Client NamespaceWeb http://weburl/_api/Web SP Microsoft.SharePoint.ClientSearch http://weburl/_api/Search SP.Search Microsoft.SharePoint.Client.Searc

hTaxonomy http://weburl/_api/

Taxonomy SP.Taxonomy

Microsoft.SharePoint.Client.Taxonomy

Social http://weburl/_api/Social SP.Social Microsoft.SharePoint.Client.Social

Page 11: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Consistent UsageREST/ODatahttps://contoso.sharepoint.com/_api/web/Title

Managed CodeClientContext ctx = new ClientContext("https://contoso.sharepoint.com");ctx.Load(ctx.Web.Title);ctx.ExecuteQuery();

JavaScriptvar ctx = new SP.ClientContext("https://contoso.sharepoint.com");ctx.load(ctx.get_web().get_title());ctx.executeQueryAsync();

Page 12: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Base endpoint GET http://<weburl>/_api

Get the web’s titleGET http://<weburl>/_api/Web/title

Get the collection of lists in the webGET http://<weburl>/_api/Web/lists

Get the lists in the web with a BaseTemplate of 104 (announcement lists)GET http://<weburl>/_api/Web/lists?$filter=BaseTemplate eq 104

Create a new listPOST http://<weburl>/_api/web/Lists

Body:

{ 'd' : {'__metadata': {'type': 'SP.List'},'Title': 'My New List,'Url': 'newlist','TemplateType': 101,'TemplateFeatureId': '00BFEA71-E717-4E80-AA17-D0C71B360101'}}

Sample REST / OData Calls

Page 13: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

demo

SharePoint _API

Page 14: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Meet the App Principals

Page 15: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

(Rob)

Page 16: Building end-to-end apps for SharePoint with Windows Azure and Windows 8
Page 17: Building end-to-end apps for SharePoint with Windows Azure and Windows 8
Page 18: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Contoso photo

Page 19: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Contoso photo

Contoso

Page 20: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

?Contoso photo

Contoso

Page 21: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Contoso photo

Contoso

Page 22: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

View

View

Contoso photo

Contoso

Page 23: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

View, Upload, Tag, Comment

View, Upload, Tag, Comment

Contoso photo

Contoso

Page 24: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

View, Upload, Tag, Comment, Change Password

View, Upload, Tag, Comment, Change Password

Contoso photo

Contoso

Page 25: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

View, Upload, Tag, Comment, Change Password

Contoso photo

Contoso

Page 26: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

View, Upload, Tag, Comment, Change Password

Contoso photo

Contoso

Page 27: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

View, Upload, Tag, Comment, Change Password

Contoso photo

Contoso

Page 28: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

View, Upload, Tag, Comment, Change Password

View

Contoso photo

Contoso

Page 29: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

View, Upload, Tag, Comment, Change Password

View

Contoso photo

Contoso

Page 30: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

SharePoint

SharePoint 2007

Sandbox

SharePoint 2010

SharePoint

Azure, IIS, LAMP, etc…

_api

SharePoint 2013

App Model: Past, Present and Future

Page 31: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

What: The protocol to handle the authorization flow.Based on existing internet implementations

Why:Functionality

App and User identitiesEstablished model for granting app accessSimple

OtherEngineering efficienciesGood adoption

Clear architectural roadmap

OAuth 2.0

Page 32: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

32

User credentialsprovided?Start

End

User only context

App only context

User + App

context

Anonymous context

App tokenprovided?

App tokenIncludes user?

AuthenticationYes

No

No No

Yes Yes

Page 33: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

SharePoint Context Token

SharePoint Server

App.com

Browser

Page 34: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Browser

SharePoint Server

App.com

STS (ACS)

Page 35: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Browser

SharePoint Server

1

App.com

STS (ACS)

1) User browses to a SharePoint page with an app from app.com on it

https://rhoward.sharepo

Page 36: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Browser

SharePoint Server

1

App.com

2

STS (ACS)

2) SharePoint asks ACS to create and sign a token which contains context information (e.g. the current user) and an auth code

https://rhoward.sharepo

Page 37: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Browser

SharePoint Server

1

App.com

2

STS (ACS)

3

3) ACS returns the signed context token

https://rhoward.sharepo

Page 38: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Browser

SharePoint Server

1

App.com

2

STS (ACS)

3

4

4) SharePoint renders the page including an iframe, which will POST the context token to app.com

SP API Reviewhttps://rhoward.sharepo

POST https://app.com/…SPAppToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e…

Page 39: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Browser

SharePoint Server

1

5

App.com

2

STS (ACS)

3

4

5) The iframe causes the browser to request a page from app.com including the context token

SP API Reviewhttps://rhoward.sharepo

Page 40: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Browser

SharePoint Server

1

5

App.com

2

STS (ACS)

3

4

6

6) App.com validates the signature on the context token, extracts the auth code, and uses its credentials to request an access token from ACS

SP API Reviewhttps://rhoward.sharepo

Page 41: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Browser

SharePoint Server

1

5

App.com

2

STS (ACS)

3

4

6

7

7) Windows Azure Access Control Service (ACS) returns an access token

SP API Reviewhttps://rhoward.sharepo

Page 42: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Browser

SharePoint Server

1

5

8

App.com

2

STS (ACS)

3

4

6

7

8) App.com makes a web service request to SharePoint, passing the access token

SP API Reviewhttps://rhoward.sharepo

Page 43: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Browser

SharePoint Server

1

5

8

9

App.com

2

STS (ACS)

3

4

6

7

9) SharePoint returns information to App.com

SP API Reviewhttps://rhoward.sharepo

Page 44: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Browser

SharePoint Server

1

10

5

8

9

App.com

2

STS (ACS)

3

4

6

7

10) App.com renders the iframe contents

SP API Reviewhttps://rhoward.sharepo

7 Unassigned Changes21 Pending Reviews17 Active API BugsNag Mail

Nag Mail

Auto-Assign

Page 45: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

demo

A basic remote app

Page 47: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

SharePoint 2013 & Windows Azure Workflow

People

Content

Events

Collab

Visu

al S

tudi

o

Shar

ePoi

nt D

esig

ner

SharePointWF3 Host

SharePoint OM_API

Workflow Services Manager

MTW

AzureService Bus

AzureWorkflow

AzureAccess Control

OAuth2

Instances Interop

Deployment Messaging

WF4 Service Application Proxy

Page 48: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Remote Event Receivers

Page 49: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Remote Event Receivers

App Server

Remote Event

Push Notifications

Page 50: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

demo

Remote Event Receivers

Page 51: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

SharePoint 2013 has a broad, powerful set of service APIs available to clients of a comprehensive set of technologiesSharePoint 2013 independently authenticates both users and app principals Using the deep set of APIs and standard web technologies you can build a new class of innovative productivity solutions by accessing SharePoint as a service

Takeaways

Page 52: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

• Today 12:00 PM – B92 Stinger – Developing an App for SharePoint Autohosted…

Related Sessions

Page 53: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

• http://dev.office.com• http://blogs.msdn.com/b/office

apps

• http://dev.windows.com• http://windowsazure.com

Office, SharePoint & More Resources Please submit sessions evals on the Build Windows 8 App

or at http://aka.ms/BuildSessions

Page 54: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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.

Page 55: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Overflow

Page 56: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Two Aspects to Access ControlAuthenticationverifying a claim made by a subject that it should be allowed to act on behalf of a given principal

Authorizationverifying that an authenticated subject has permission to perform certain operations or access specific resources

Page 57: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

SharePoint“Host” Web

App Web JavaScript

App Authentication

SharePoint“AppWeb”

Page 58: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

SharePoint“Host” Web

App Authentication

JavaScript(cross domain) SharePoint

“AppWeb”

Page 59: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

SharePoint“Host” Web

App Authentication

OAuth

SharePoint“AppWeb”

Page 60: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

App Identity Online and On-PremIn the cloudWindows Azure Active Directory (AD) comes with O365Apps use ‘3-legged’ OAuth

Azure AD

App Office 365

Cloud

Page 61: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

App Identity Online and On-PremIn the cloudWindows Azure AD comes with O365Apps use ‘3-legged’ OAuthOn-PremisesCert-based trustOn-prem to on-prem

App SharePoint

On-Prem

Azure AD

App Office 365

Cloud

Page 62: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

App Identity Online and On-PremIn the cloudWindows Azure AD comes with O365Apps use ‘3-legged’ OAuthOn-PremisesCert-based trustOn-prem to on-premHybridUse O365 Azure AD with on-prem SPSupports marketplace and on-prem apps

Azure AD

App Office 365

App SharePoint

CloudOn-Prem

Page 63: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Authorization

Page 64: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Apps have Identity (separate from Users)Ex: Printing App is distinct from the user using the Printing app

Access is based on GrantsGrants are available to AccessCheckGrants have scopes and rightsEx: Printing App has READ right on “Picture Library”

AccessCheck makes a decision usingIdentities (User, Application)Resource Attributes (ACLs)Policies

User OnlyApp & UserApp Only

Authorization Logical Model

Page 65: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Apps must request the permissions they require to run

Permission Requests

<AppPermissionRequests AllowAppOnlyPolicy="true"> <AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="Read"/> <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web/list" Right="Write"> <Property Name="BaseTemplateId" Value="101"/> </AppPermissionRequest> <AppPermissionRequest Scope="http://sharepoint/social/microfeed" Right="Manage"/> <AppPermissionRequest Scope="http://sharepoint/search" Right="Query"/></AppPermissionRequests>

Page 66: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Permission RequestsScope="http://sharepoint/content/sitecollection" Right="Read"/>

Product Permission ProviderSpecific component Capability

Page 67: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Consent

App Name Here

Page 68: Building end-to-end apps for SharePoint with Windows Azure and Windows 8

Available App PermissionsScope Right

http://sharepoint/content/tenant Read;Write;Manage;FullControlhttp://sharepoint/content/sitecollection Read;Write;Manage;FullControlhttp://sharepoint/content/sitecollection/web Read;Write;Manage;FullControlhttp://sharepoint/content/sitecollection/web/list Read;Write;Manage;FullControlhttp://sharepoint/bcs/connection Readhttp://sharepoint/search QueryAsUserIgnoreAppPrincip

alhttp://sharepoint/projectserver Managehttp://sharepoint/projectserver/projects Read;Writehttp://sharepoint/projectserver/projects/project Read;Writehttp://sharepoint/projectserver/enterpriseresources Read;Writehttp://sharepoint/projectserver/statusing SubmitStatushttp://sharepoint/projectserver/reporting Readhttp://sharepoint/projectserver/workflow Elevatehttp://sharepoint/social/tenant Read;Write;Manage;FullControlhttp://sharepoint/social/core Read;Write;Manage;FullControlhttp://sharepoint/social/microfeed Read;Write;Manage;FullControlhttp://sharepoint/taxonomy Read;Write