Getting Started with Office 365 Development
-
Upload
dragan-panjkov -
Category
Software
-
view
700 -
download
1
description
Transcript of Getting Started with Office 365 Development
Getting Started with Office 365
DevelopmentSpeaker: Dragan Panjkov
15th November 2014
Host: Matthew Hughes
O365EU Sponsors
Dragan Panjkov
Learning SharePoint since 2007 www.dragan-panjkov.com www.twitter.com/panjkov
PlanB. d.o.o. www.planb.ba
New Office User Group BiH www.1sug.com www.mscommunity.ba
MCSD – SharePoint Applications MVP for Office365 (april 2014)
AgendaApps for Office
Apps for SharePoint
Office 365 REST APIs
5
Apps for Office
Office 2013 web apps
Content app
Mail app
Task pane app
Office 2013 development options
Pre-Office 2013 developmentExtending Office ribbon
COM add-in
Macro
VSTO
Office 2013 desktop apps
Task pane app
Content app
Mail app
Office 2013 development scenarios
Business processes Sales and marketing, finance, and HR
Team collaboration Content and project management
Workflow Document approval and expenses
App for Sharepoint
Document template
App for Office
App for Office
App for Office
App for Office
Translation, definitions, dictionary, help, research
Business data lookup (CRM), contextual forms (surveys)
Rich web content YouTube video and photo gallery
Data visualization, analysis and
mashups
Maps, custom charts, and lookups
Reference tools
Content authoring and
publishingContextual
content and services
Workflow and collaboration
Doc builders and print services
Project tracking, coauthoring
App for Office
Content authoring
Resumes and contracts
Dashboards Data analysis and data mashups
Forms andreports
Legal forms and financial reports
Document template
App for Office
App for Office
App for Office
App for Office
Apps for Office - dev fundamentals App components:
App manifest Web site
Office JavaScript API (Office.js)
Referenced on Microsoft CDN or deployed locally
API updates are versioned
It’s web development! Use all JS/CSS frameworks
you want! Same origin policy applies Secure dev practices needed
(SSL, input validation etc.)
Web server
Office Store or
App catalog
http://aka.ms/OfficeJSAPIs
Build your first App for Office
Demo
App shapes for Office
Task paneApp adjacent to the document
ContentApp in the body of the document
Mail Inline pane on an email or appointment item
App shapes for Office
Task paneApp adjacent to the document
ContentApp in the body of the document
Mail Inline pane on an email or appointment item
App shapes for Office
Task paneApp adjacent to the document
ContentApp in the body of the document
Mail Inline pane on an email or appointment item
Apps for Office samples
Demo
Apps for SharePoint
SharePoint apps - recap
Code is isolated from SharePoint, using remote APIsClient-side: JavaScript in user’s browserServer-side: CSOM code in Azure/IIS/other
Custom client code
_api
JavaScript library Silverlight library .Net CLR library
Execute query REST/
OData
…SearchSites, Lists and
LibsTaxonomy BCSWorkflow
The SharePoint client APIs
Packaging and publishing apps
Packaging apps.app file extension—a package typically includes the following files:
AppManifest.xml
AppIcon.png
Solution file
Data tier application package
Publishing appsOffice Store
App catalogs
Build your first App for SharePoint
Demo
App shapes for SharePoint
Full pageImplement complete app experiences to satisfy business scenarios
PartsCreate app parts that can interact with the SharePoint experience
UI command extensionsAdd new commands to the ribbon and item menus
App shapes for SharePoint
Full pageImplement complete app experiences to satisfy business scenarios
PartsCreate app parts that can interact with the SharePoint experience
UI command extensionsAdd new commands to the ribbon and item menus
App shapes for SharePoint
Full pageImplement complete app experiences to satisfy business scenarios
PartsCreate app parts that can interact with the SharePoint experience
UI command extensionsAdd new commands to the ribbon and item menus
App for SharePoint sample
Demo
Office 365 APIs
Available REST EndpointsExchange & Outlook.com
Calendar
Contacts
OneDrive
OneDrive for Business
Active Directory
Users
Groups
SharePoint
Client API
Search
Sites, Lists and Libs
Taxonomy
BCSWorkflow
…
Sites
Common Consent Framework for Office 365
• Single Authentication flow for O365• Azure AD Graph, Exchange,
SharePoint• Device apps and web apps• Admin and end-user consent
• Secure protocol• OAuth 2.0• No capturing user credentials• Fine-grained access scopes• Supports MFA and federated user
sign-in• Long-term access through refresh
tokens
Discovering endpoints and API’s
36
Office 365 discovery servicesAutomatically determine URL of O365 servicesSupports device app and website flowsSecured using Azure AD authenticationServes information stored about services in AAD
Rich service metadata Lists all Entities, Collections, Actions, Complex Types, Enums and their Properties.https://outlook.office365.com/api/v1.0/$metadata
• .NET SDK to build many types of apps using Visual Studio.NET Windows Store AppsWindows Forms ApplicationWPF ApplicationASP.NET MVC Web ApplicationASP.NET Web Forms ApplicationXamarin Android and iOS ApplicationsMulti-device Hybrid Apps (Cordova)
• Android SDK & iOS SDK’s
Rich Tooling
Get the tools
https://visualstudiogallery.msdn.microsoft.com/a15b85e6-69a7-4fdf-adda-a38066bb5155?SRC=VSIDE
Permissions Read, Read+Write, Send
Entities, Collections, Actions
Samples https://outlook.office365.com/api/v1.0/Me/Folders/Inbox/ https://outlook.office365.com/api/v1.0/Me/Folders/Inbox/Messages?$top=1 https://outlook.office365.com/api/v1.0/Me/SendMail/
Entity Collection Actions
Folder Folders CRUD, Copy, Move
Message Messages
CRUD, Copy, Move, Reply, ReplyAll, Forward, Send, CreateReply, CreateReplyAll, CreateForward
Attachment Attachments CRUD
CollectionEntity
Intuitive Send API
Permissions Read, Read+Write
Entities, Collections, Actions
Samples https://outlook.office365.com/api/v1.0/Me/Calendar https://outlook.office365.com/api/v1.0/Me/Calendar/Events?$top=1 https://outlook.office365.com/api/v1.0/Me/CalendarView?startDateTime=2014-10-
01T01:01:01Z & endDateTime=2014-11-01T01:01:01Z
Calendar
Entity Collection Actions
CalendarGroup CalendarGroups CRUD
Calendar Calendars CRUD
Event EventsCRUD, Accept, Decline, TentativelyAccept
CalendarView N/A Read
Attachment Attachments CRUD CollectionEntity
No client-side recurrence
expansion required
Permissions Read, Read+Write
Entities, Collections, Actions
Samples https://outlook.office365.com/api/v1.0/Me/ContactFolders(‘Contacts’)/ https://outlook.office365.com/api/v1.0/Me/Contacts/
Use AAD Graph API to find users in a tenant.
Contacts
Entity Collection Actions
ContactFolder ContactFolders
Contact Contacts CRUD
Permissions Read, Read+Write
Entities, Collections, Actions
Samples https://contoso-my.sharepoint.com/_api/v1.0/me/drive https://contoso-my.sharepoint.com/_api/v1.0/me/drive/files
Files
Entity Collection Actions
Drive Read
File Files CRUD, Upload, Download
Folder CRUD
Permissions Read, Read+Write
Entities, Collections, Actions
Samples https://graph.windows.net/contoso.com/users?api-version=1.5 https://graph.windows.net/contoso.com/groups?api-version=1.5
Users + Groups
Entity Collection Actions
User Users CRUD
Groups Groups CRUD
Rich Query Syntax using ODataScenario URL
Get 5 messages from Inbox https://outlook.office365.com/api/v1.0/Me/Folders/Inbox/Messages?$top=5
Get the next 10 messages https://outlook.office365.com/api/v1.0/Me/Folders/Inbox/Messages?$top=10&$skip=5
Get top 10 messages sorted by DateTimeCreated
https://outlook.office365.com/api/v1.0/Me/Folders/Inbox/Messages?$top=10&$orderby=DateTimeCreated
Get selective properties on messages
https://outlook.office365.com/api/v1.0/Me/Folders/Inbox/Messages?$top=5&$select=From,DateTimeCreated,Subject
Get events starting after a particular DateTime
https://outlook.office365.com/api/v1.0/Me/Events?$top=5&$select=Subject,Start,End&$filter=Start ge 2014-09-22T20:00:00Z
Get Inbox messages with subject and attachment info
https://outlook.office365.com/api/v1.0/Me/Folders/Inbox/Messages?$format=application/json;odata.metadata=none&$select=Subject&$expand=Attachments
Get # of messages with attachment(s)
https://outlook.office365.com/api/v1.0/Me/Folders/Inbox/Messages/$count?$filter=HasAttachments eq true
Get count and selective props on messages with attachment(s)
https://outlook.office365.com/v1.0/Me/Folders/Inbox/Messages?$format=application/json;odata.metadata=none&$select=Subject&$filter=HasAttachments%20eq%20true&$count=true
Get contact with a given name
https://outlook.office365.com/v1.0/Me/Contacts/?$filter=Givenname eq ‘John’
45
Getting Started:
Office 365 APIs starter Project – Visual StudioDemo
RecapEmbed your customization in Office and SharePoint user experience using Apps
Manipulate data in Office 365 from your standalone apps using REST APIs
47
Resources• Microsoft Virtual Academy
http://www.microsoftvirtualacademy.com/product-training/office-development
• TechEd Europe 2014 sessionshttp://www.dragan-panjkov.com/getting-started-with-office-365-development-teched-europe-2014-session-resources
• ITUnity Article (Getting Started) http://www.itunity.com/article/programming-office-365-apis-general-availability-release-678
• GitHub Office Dev Repository https://github.com/OfficeDev
• Office Dev portaldev.office.com
Questions?www.dragan-panjkov.com
www.twitter.com/panjkov