Mastering Office 365 Development 
TONI POHL, @ATWORK, MVP WINDOWS PLATFORM DEV., ATWORK
Mastering Office 365 Development 
Cloud First! In this session we will show you how you can extend 
your Office 365 solutions with Development. We will go through 
identity management as well as showing you how you can use 
client libraries and build in some cool Office 365 functionality in 
your own solutions. We will also use the Office 365 API to develop 
our own Windows 8.1 app.
Agenda 
Working with Identities in AAD 
Office Graph 
Office 365 API
…use your desired 
service(s)
TIPS
Office 365 General Dev. Tips 
1. Create a 30-days Office 365 tenant [and remind your pwds…] 
http://office.microsoft.com/en-001/business/compare-all-office- 
365-for-business-plans-FX104051403.aspx 
2. Create a dev SPO site [and an app site] 
3. Use multiple browsers [and the private mode] 
4. Have an Azure subscription [and connect your O365 tenant] 
5. Check for the latest code samples [outdated samples in MSDN] 
6. Remember: you work with the cloud services 
[throtteling, version, …] 
7. Use GraphExplorer for checking AAD data 
8. Use PowerShell Scripting
Open an Office 365 trial with partner
WORKING WITH IDENTITIES IN AAD
Typical Scenarios 
Office 365 
AAD 
SaaS 
PaaS 
IaaS 
Azure 
LAN 
AD 
ERP 
… 
DirSync 
or 
ADFS
How the Authentication works with AAD 
Source: http://msdn.microsoft.com/library/azure/dn151790.aspx 
OAuth: 
Client App 
Client Secret 
[Redirect URI] 
-> 
Token [code] 
(WSFed* or Open ID 
Connect [OWIN]) 
-> 
Request against API 
Endpoint (ADAL) 
-> 
Access Token 
(JWT, serializable) 
-> 
Actions: Request with 
Bearer in HTTP Header
AAD IDENTITIES DEMO
GRAPH API DEMO
Add an existing AAD to Azure portal
The result:
Permissions & more
OFFICE GRAPH (PREVIEW)
Office Graph 
Important: 
the current version of the Office Graph API is a pre-release. 
It is offered as-is and currently Microsoft offers no support for 
solutions leveraging it. 
Also should you choose to invest in a solution using Office Graph 
keep in mind that you will have to update your solution once the 
Office Graph API is officially released.
OFFICE 365 API (PREVIEW)
Get the Office 365 API Tools 
https://visualstudiogallery.msdn.microsoft.com/7e947621-ef93-4de7-93d3-d796c43ba34f?SRC=VSIDE
Office 365 API Preview
Office 365 API (Preview) 
Important: 
the current version of the Office 365 API is a pre-release. 
It is offered as-is and currently Microsoft offers no support for 
solutions leveraging it. 
Also should you choose to invest in a solution using Office 365 API 
keep in mind that you will have to update your solution once the 
Office 365 API is officially released.
Office 365 API works with… 
• .NET Windows Store Apps 
• .NET Windows Store Universal Apps 
• Windows Forms Applications 
• WPF Applications 
• ASP.NET MVC Web Applications 
• ASP.NET Web Forms Applications 
• Xamarin Android and iOS Applications 
• Multi-device Hybrid Apps 
• Windows Phone 8.1 Apps (version 1.1.728 owards) 
https://visualstudiogallery.msdn.microsoft.com/7e947621-ef93- 
4de7-93d3-d796c43ba34f?SRC=VSIDE
OFFICE 365 API (PREVIEW) DEMO
Current Issue with Office 365 API Preview 
Request: 
https://outlook.office365.com/ews/odata/Me/Inbox/Messages 
Response: 400 
{"error":{"code":"ErrorInvalidRequest","message":"Cannot resolve the 
OData request URL."}} 
https://social.msdn.microsoft.com/Forums/de-DE/1b1cac30-352a- 
4e44-bed0-cb5f9b1997bb/office-365-api-changes-since- 
09102014?forum=appsforoffice
RESOURCES
Links - 1 
• Create a 30-days Office 365 tenant 
http://office.microsoft.com/en-001/business/compare-all-office- 
365-for-business-plans-FX104051403.aspx 
• Sample MVC Web: WebApp-GraphAPI-DotNet 
https://github.com/AzureADSamples/WebApp-GraphAPI-DotNet 
• Sample App: WebApp-OpenIDConnect-DotNet 
https://github.com/AzureADSamples/WebApp-OpenIDConnect- 
DotNet 
• GraphExplorer 
https://graphexplorer.cloudapp.net/
Links - 2 
• Help: Adding Sign-On to Your Web Application Using Azure AD 
http://msdn.microsoft.com/library/azure/dn151790.aspx 
• Office 365 API Tools - Preview 
https://visualstudiogallery.msdn.microsoft.com/7e947621-ef93-4de7-93d3- 
d796c43ba34f?SRC=VSIDE 
• Developing iOS Apps with Azure and Office 365 APIs 
http://blogs.msdn.com/b/richard_dizeregas_blog/archive/2014/10/06/develo 
ping-ios-apps-with-azure-and-office-365-apis.aspx 
• ADAL for iOS 
https://github.com/AzureAD/azure-activedirectory-library-for-objc 
• Delve and the Office Graph 
http://blogs.technet.com/b/austria/archive/2014/09/27/delve-und-der-office-graph. 
aspx 
• Office Graph Explorer 
http://blog.atwork.at/post/2014/10/03/Office-365-Office-Graph-Explorer.aspx
SUMMARY
Summary – Key Take Aways 
Use Office 365 for Development 
Use Office 365 for Authentication 
[Check out Office Graph] 
[Use Office 365 API for own projects] 
Check out the latest libraries & code samples 
Remember: you work with the cloud 
questions? 
BLOG.ATWORK.AT 
ATWORK
thank you. 
SHAREPOINT AND PROJECT CONFERENCE ADRIATICS 
ZAGREB, 10/15/2014 - 10/16/2014

Mastering Office 365 Development

  • 1.
    Mastering Office 365Development TONI POHL, @ATWORK, MVP WINDOWS PLATFORM DEV., ATWORK
  • 3.
    Mastering Office 365Development Cloud First! In this session we will show you how you can extend your Office 365 solutions with Development. We will go through identity management as well as showing you how you can use client libraries and build in some cool Office 365 functionality in your own solutions. We will also use the Office 365 API to develop our own Windows 8.1 app.
  • 4.
    Agenda Working withIdentities in AAD Office Graph Office 365 API
  • 5.
  • 6.
  • 7.
    Office 365 GeneralDev. Tips 1. Create a 30-days Office 365 tenant [and remind your pwds…] http://office.microsoft.com/en-001/business/compare-all-office- 365-for-business-plans-FX104051403.aspx 2. Create a dev SPO site [and an app site] 3. Use multiple browsers [and the private mode] 4. Have an Azure subscription [and connect your O365 tenant] 5. Check for the latest code samples [outdated samples in MSDN] 6. Remember: you work with the cloud services [throtteling, version, …] 7. Use GraphExplorer for checking AAD data 8. Use PowerShell Scripting
  • 8.
    Open an Office365 trial with partner
  • 9.
  • 10.
    Typical Scenarios Office365 AAD SaaS PaaS IaaS Azure LAN AD ERP … DirSync or ADFS
  • 11.
    How the Authenticationworks with AAD Source: http://msdn.microsoft.com/library/azure/dn151790.aspx OAuth: Client App Client Secret [Redirect URI] -> Token [code] (WSFed* or Open ID Connect [OWIN]) -> Request against API Endpoint (ADAL) -> Access Token (JWT, serializable) -> Actions: Request with Bearer in HTTP Header
  • 12.
  • 13.
  • 16.
    Add an existingAAD to Azure portal
  • 17.
  • 18.
  • 19.
  • 21.
    Office Graph Important: the current version of the Office Graph API is a pre-release. It is offered as-is and currently Microsoft offers no support for solutions leveraging it. Also should you choose to invest in a solution using Office Graph keep in mind that you will have to update your solution once the Office Graph API is officially released.
  • 22.
    OFFICE 365 API(PREVIEW)
  • 23.
    Get the Office365 API Tools https://visualstudiogallery.msdn.microsoft.com/7e947621-ef93-4de7-93d3-d796c43ba34f?SRC=VSIDE
  • 24.
  • 25.
    Office 365 API(Preview) Important: the current version of the Office 365 API is a pre-release. It is offered as-is and currently Microsoft offers no support for solutions leveraging it. Also should you choose to invest in a solution using Office 365 API keep in mind that you will have to update your solution once the Office 365 API is officially released.
  • 26.
    Office 365 APIworks with… • .NET Windows Store Apps • .NET Windows Store Universal Apps • Windows Forms Applications • WPF Applications • ASP.NET MVC Web Applications • ASP.NET Web Forms Applications • Xamarin Android and iOS Applications • Multi-device Hybrid Apps • Windows Phone 8.1 Apps (version 1.1.728 owards) https://visualstudiogallery.msdn.microsoft.com/7e947621-ef93- 4de7-93d3-d796c43ba34f?SRC=VSIDE
  • 27.
    OFFICE 365 API(PREVIEW) DEMO
  • 28.
    Current Issue withOffice 365 API Preview Request: https://outlook.office365.com/ews/odata/Me/Inbox/Messages Response: 400 {"error":{"code":"ErrorInvalidRequest","message":"Cannot resolve the OData request URL."}} https://social.msdn.microsoft.com/Forums/de-DE/1b1cac30-352a- 4e44-bed0-cb5f9b1997bb/office-365-api-changes-since- 09102014?forum=appsforoffice
  • 29.
  • 30.
    Links - 1 • Create a 30-days Office 365 tenant http://office.microsoft.com/en-001/business/compare-all-office- 365-for-business-plans-FX104051403.aspx • Sample MVC Web: WebApp-GraphAPI-DotNet https://github.com/AzureADSamples/WebApp-GraphAPI-DotNet • Sample App: WebApp-OpenIDConnect-DotNet https://github.com/AzureADSamples/WebApp-OpenIDConnect- DotNet • GraphExplorer https://graphexplorer.cloudapp.net/
  • 31.
    Links - 2 • Help: Adding Sign-On to Your Web Application Using Azure AD http://msdn.microsoft.com/library/azure/dn151790.aspx • Office 365 API Tools - Preview https://visualstudiogallery.msdn.microsoft.com/7e947621-ef93-4de7-93d3- d796c43ba34f?SRC=VSIDE • Developing iOS Apps with Azure and Office 365 APIs http://blogs.msdn.com/b/richard_dizeregas_blog/archive/2014/10/06/develo ping-ios-apps-with-azure-and-office-365-apis.aspx • ADAL for iOS https://github.com/AzureAD/azure-activedirectory-library-for-objc • Delve and the Office Graph http://blogs.technet.com/b/austria/archive/2014/09/27/delve-und-der-office-graph. aspx • Office Graph Explorer http://blog.atwork.at/post/2014/10/03/Office-365-Office-Graph-Explorer.aspx
  • 32.
  • 33.
    Summary – KeyTake Aways Use Office 365 for Development Use Office 365 for Authentication [Check out Office Graph] [Use Office 365 API for own projects] Check out the latest libraries & code samples Remember: you work with the cloud 
  • 34.
  • 35.
    thank you. SHAREPOINTAND PROJECT CONFERENCE ADRIATICS ZAGREB, 10/15/2014 - 10/16/2014