chris obrien - weaving enterprise solutions into office products
DESCRIPTION
A presentation I gave at TechEd 2014 (Barcelona) in October 2014. Covers some fundamentals of developing Apps for Office, and shows a sample Word task pane app, which analyzes the current document and searches your SharePoint/Office 365 environment for similar documents. The app also integrates with OneDrive for Business, to allow the user to save links for future reference. Also, my co-presenter Andrew Salamatov presents some great information and demos around mail apps. The presentation also covers some common mistakes, and tips and tricks when developing Apps for Office.TRANSCRIPT
Permissions model
Restricted -> Read -> Write -> ReadWrite
(end-user and developer)
Access the full document (in slices up to 4MB)
Collection of locations in document (e.g. user or app defined)
Navigate to a place in the document (binding)
Persist some state (get/set)
May need CORS, JSONP or server-side proxy
related
MSDN - How to: Create an app for SharePoint that contains a document template and task pane app
Document is then used as template in SharePoint
Server-side authentication back to SharePoint is difficult (no SharePoint context passed)
Workaround – use client-side code (cross domain library)
One instance of app files each
(task pane app + SharePoint app)
Demo shows app with 2 surfaces –
Word task pane + SharePoint• Task pane app finds documents
with similar content to current
doc (public web service + SP
search)
• SP provider-hosted app used to
configure user’s OneDrive site
(adds list/ctype etc. using
OfficeDev PnP “core” libraries)
• Allows user to “save reference”
from task pane to their OneDrive
• SP search enhancements
implemented for this content
(result source, display templates
etc.)
Showing different tabs within the
task pane app: • Keywords/phrases found in the
current document – top 3 are
used to power the search for
similar documents
• “Sentiment” of current document
Showing references saved from task
pane app into the user’s OneDrive
site
Showing saved references shown in
search results (given special
rendering with gray background)
SearchDisplay
templatesUser profiles
OneDrive for
Business sitesLists
SharePoint
External
not
(and more to come!)
ReadWriteMailbox
ReadWriteItem
ReadItem
Restricted• Limited access to
item props
• Read access to item
• R/W access to item
• R/W access to item
• Limited EWS access
* Due to limitations of iOS, AAD auth won’t work, so Exchange Identity Token is necessary. Android works.
APP
Outlook
App BackendExchange
1 2
3
EIT1 AAD refresh token
1
EIT2 AAD refresh token
2
EIT3 AAD refresh token
3
… …
4
App requests tokenToken passed back
for validation
App backend validates token
Looks up
identity
mapping
Identity Mapping
App + Service hostBug Database
• Uses Windows Integrated auth
• Uses service account to call into bug database
App + Service host
Task pane app x x x
Content app x x x
Mail app x x
App for SharePoint x x
Azure Websites
(using Azure for app hosting)
• Document is not running in app web
•
•
•
•
http://msdn.microsoft.com/en-us/library/office/jj612823(v=office.15).aspx
BUT, no app parts! Consider JS injection instead..
http://aka.ms/OfficeDevPnP
•
•
-> Consider Office 365/Azure AD external app if target is Office 365
PowerPoint
• Corporate
presentation
builder
Excel
• Import data from
LOB system for
analysis
Word
• Proposal/contract
builder
• Yammer
integration
• Bug tracker
• Frequent snippets
• Meeting location
details
http://msdn.microsoft.com/EN-US/library/office/fp161135(v=office.15).aspx
http://msdn.microsoft.com/en-us/library/office/fp179815(v=office.15).aspx
http://aka.ms/COB