Download presentation
Presentation is loading. Please wait.
Published byNathan Roberts Modified over 6 years ago
1
Microsoft Ignite NZ 25-28 October 2016 SKYCITY, Auckland
3
Building Cross-Platform Mobile Applications with Xamarin and the Microsoft Graph
Andrew Coates Microsoft @coatsy
4
Office Platform WHAT CAN I BUILD? ADD-INS AND WEB PARTS:
Microsoft Ignite 2016 11/9/2018 2:08 PM Office Platform WHAT CAN I BUILD? ADD-INS AND WEB PARTS: Make your solution a native part of the modern Office WEB AND DEVICE APPS: Build smarter apps by connecting to Office services VOICE, VIDEO, CONNECTORS, AND BOTS: Create the next generation of productivity solutions © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
5
Agenda Excel REST API and SDK Xamarin Forms Authentication with MSAL
Bringing it all together
6
Excel REST API and SDK
7
Excel Powered Apps: Workbook as a service
TechReady 23 11/9/2018 2:08 PM Excel Powered Apps: Workbook as a service Power your app with 700+ Excel APIs Available over drives API in Microsoft Graph Supports OneDrive Business, Office 365 Groups & SharePoint online files Access secured by OAuth2.0 Uses JSON format for both input and output © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
8
Excel REST API in Microsoft Graph
11/9/2018 2:08 PM Excel REST API in Microsoft Graph Your App Microsoft Graph API (graph.microsoft.com) USERS GROUPS FILES MAIL CALENDAR EXCEL Microsoft Graph rich relationships and insights © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
9
Excel REST API in Microsoft Graph
TechReady 23 11/9/2018 2:08 PM Excel REST API in Microsoft Graph Get workbook GET Microsoft Graph Path to file in OneDrive, SharePoint or Office 365 groups Excel REST API © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
10
Sample queries - reporting
Change the background fill color of range A1:A6 PATCH .../workbook/worksheets('Sheet1')/range(address='A1:A6')/format/fill { color: "#FF0000" } Create a column clustered chart with data from A1:C6 POST .../workbook/worksheets('Sheet1')/charts/add { "type": "ColumnClustered", "sourcedata": "A1:C6", "seriesby": "Auto" } Get the chart created as an image GET .../workbook/worksheets('Sheet1')/charts('Chart1') /image(width=0,height=0,fittingMode='fit')
11
Sample queries – calc and data manipulation
Use functions POST .../workbook/functions/pmt { "rate": 0.035, "nper": 20, "pv": } Sort data in range A1:A6 POST .../workbook/worksheets('Sheet1')/range(address='A1:A6')/sort/apply { fields: [{ key: 0, ascending: true }] } Filter the Table1 to get the top 3 items based on the 1st column POST .../workbook/worksheets('Sheet1')/tables('Table1')/columns/itemAt(index=0)/filter/apply { criteria: { filterOn: "topPercent", criterion1: "3" } }
12
Microsoft Graph SDKs support Excel REST API
GA: .Net/Xamarin and Android Preview: Node.js, JavaScript Coming: iOS, Ruby, PHP // Create a chart based on the table range. var workbookChart = await graphClient.Me.Drive.Items[excelFileId] .Workbook .Worksheets[“Sheet1"] .Charts .Add("ColumnStacked", "Auto", tableRange.Address) .Request() .PostAsync();
13
Excel REST API Scenarios
TechReady 23 11/9/2018 2:08 PM Excel REST API Scenarios Data Management Automate data collection through API and integration with other services. Consuming existing data in Excel. Worksheet Automation Manage worksheet remotely from your app without UI. Automate workflows around worksheets. Calculation Service Leverage the most powerful calculation engine. Reporting Service Get professional charts, powerful data analysis, even PivotTable all with a simple API call. © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
14
Microsoft Graph SDK Target the /v1.0 branch
TechReady 23 11/9/2018 2:08 PM Microsoft Graph SDK Target the /v1.0 branch Decoupled for easy authentication integration Active Directory Authentication Library (ADAL) Microsoft Authentication Library (MSAL) … Available on multiple platforms UWP, iOS, Android and ASP.NET MVC More coming soon… Consistent primitives © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
15
Consistent primitives
TechReady 23 11/9/2018 2:08 PM Consistent primitives // C# var user = graphServiceClient.Me.Request().GetAsync(); // Do something... // Java graphServiceClient.getMe().buildRequest().get(new ICallback<User>() { // Do something… }); // Obj-C [[[graphServiceClient me] request] getWithCompletion:^(MSGraphUser *user, NSError *error){ }]; © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
16
TechReady 23 11/9/2018 2:08 PM Codename “Vipr” © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
17
Xamarin Forms
18
Xamarin Forms
19
Pages
20
Layouts
21
Controls
22
XAML Markup or Code
24
Authentication with MSAL
25
Register your app to use the Microsoft Graph
TechReady 23 11/9/2018 2:08 PM Register your app to use the Microsoft Graph Every app must (v1) be registered in an Azure Active Directory tenant declare in advance that it will access the Microsoft Graph declare in advance all of the permission scopes it needs for the Microsoft Graph Every app must (v2) be registered in the Application Registration Portal ( “Spend most of your time building the parts of your app that add value and differentiate it from the crowd.” – Application Registration Portal © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
26
Gotchas You need PCL Profile 7 (no WP8) Default is 111
TechReady 23 11/9/2018 2:08 PM Gotchas You need PCL Profile 7 (no WP8) Default is 111 Edit the Project file © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
27
Gotchas (Android and iOS)
You need a custom PageRenderer so MSAL knows how the login dialog will be rendered See
28
Gotchas (Android) Turn off Fast Deployment TechReady 23
11/9/2018 2:08 PM Gotchas (Android) Turn off Fast Deployment © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
29
Gotchas (Android cont)
TechReady 23 11/9/2018 2:08 PM Gotchas (Android cont) Enable x-machine CPU support in Hyper-V © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
30
Bringing it all together
Demo
31
Resources Excel Developer Centre Excel Developer Session at Ignite US
Excel Developer Session at Ignite US Xamarin.Forms and Graph Session at Ignite US
32
Resources Main MS Graph Landing Page MS Graph Change Log
TechReady 23 11/9/2018 2:08 PM Resources Main MS Graph Landing Page MS Graph Change Log Excel REST API Documentation //build MSAL announcement © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
33
Resources (cont) Office Developer Show on MSAL
TechReady 23 11/9/2018 2:08 PM Resources (cont) Office Developer Show on MSAL Office Developer Show on Excel REST API iOS Simulator on Windows © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
34
Resources (Sample Code)
TechReady 23 11/9/2018 2:08 PM Resources (Sample Code) Xamarin Blog on MSAL and Forms © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
35
Resources (//build/ videos)
TechReady 23 11/9/2018 2:08 PM Resources (//build/ videos) Microsoft Graph Overview Working with Excel Documents with the Microsoft Graph What's New with Microsoft Graph SDKs What's New in the People API on the Microsoft Graph © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
36
Resources (Office Blog Posts)
TechReady 23 11/9/2018 2:08 PM Resources (Office Blog Posts) Microsoft Graph findMeetingTimes API update Office Dev PnP Web Cast – Introduction to Microsoft Graph for Office 365 developer © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
37
Questions Building Cross-Platform Mobile Applications with Xamarin and the Microsoft Graph M369 Andrew Coates Microsoft @coatsy
38
Give you app Office365 Super Powers TODAY
graph.microsoft.io
39
11/9/2018 2:08 PM © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.