365 raisons d’inclure Office365 dans vos apps mobiles (Authentifications, Listes, Agenda dans vos Apps crossplateform)

  • Published on
    16-Jul-2015

  • View
    226

  • Download
    0

Embed Size (px)

Transcript

<ul><li><p>AMBIENT INTELLIGENCE</p><p>tech days2015</p><p>#mstechdays techdays.microsoft.fr </p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>Los GaudebertConsultant mobilit</p><p>lois.gaudebert@ai3.fr</p><p>Remi AubertConsultant dveloppement</p><p>remi.aubert@ai3.fr</p><p>AI3Pure Player Microsoft</p><p>Paris</p><p>Nantes</p><p>Toulouse</p><p>Aix-en-Provence</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p> Lauthentification</p><p> Laccs au calendrier, contacts et mails</p><p> Laccs aux listes</p><p> Laccs aux fichiers</p></li><li><p>tech.days 2015#mstechdaysSESSION</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p> lUX de chaque plateforme</p><p> C# &amp; .Net Framework</p><p> partager du code entre les plateformes</p><p> les performances natives de chaque plateforme</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>IHM native</p><p>Avec partage du </p><p>code mtier</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>IHM en XAML</p><p>Avec partage du </p><p>code mtier</p></li><li><p>tech.days 2015#mstechdaysSESSION</p></li><li><p>tech.days 2015#mstechdaysSESSION</p></li><li><p>tech.days 2015#mstechdaysSESSION</p></li><li><p>tech.days 2015#mstechdaysSESSION</p></li><li><p>tech.days 2015#mstechdaysSESSION</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p> Mail</p><p> Calendrier</p><p> Contact</p><p> Sites</p><p> Fichiers (OneDrive For Business)</p><p> Utilisateurs</p><p> Organisation</p></li><li><p>tech.days 2015#mstechdaysSESSION</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>https://portal.office.com/Signup/Signup.aspx?OfferId=C69E7747-2566-4897-8CBA-B998ED3BAB88&amp;DL=DEVELOPERPACK&amp;ali=1#0</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>Les mains dans le cambouis :SDK pour Store Apps</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>1 2</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>3</p><p>4</p><p>_authenticationContext = new AuthenticationContext(authority);var token = await GetTokenHelperAsync(_authenticationContext, AadServiceResourceId);</p><p>var eventsResults = await exchangeClient.Me.Calendar.Events.OrderBy(e =&gt; e.Start).ExecuteAsync();</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>Les mains dans le cambouis :SDK API pour Xamarin.Forms</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>1</p><p>2</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p> Tous les utilisateurs dun tenant Office 365 sont grs par un tenant Azure Active Directory</p><p> Azure Active Directory va grer la scurisation des accs lAPI Office 365 par dautres applications</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p> Se noter : Client ID</p><p> Key (client secret)</p><p> Redirect/Sign-On URI</p></li><li><p>tech.days 2015#mstechdaysSESSION</p></li><li><p>tech.days 2015#mstechdaysSESSION 16/02/201</p><p>5</p><p> Librairie utilise pour la gestion de lauthentification </p><p> Gestion des token et des refresh token</p><p> Compatible Azure Active Directory et ADFS</p><p> ADAL est disponible sur diffrentes plateformes</p><p> .NET, Windows Store, Windows Phone, iOS, Android, Node.JS, AngularJS, Java, </p><p>Xamarin</p></li><li><p>tech.days 2015#mstechdaysSESSION</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>//Cration dun contexteAuthenticationContext = new AuthenticationContext(CommonAuthority);</p><p>//Vrification si un cache existeif (AuthenticationContext.TokenCache.ReadItems().Count() &gt; 0) </p><p>AuthenticationContext = new AuthenticationContext(AuthenticationContext.TokenCache.ReadItems().First().Authority); </p><p>//Authentificationvar authResult = await AuthenticationContext</p><p>.AcquireTokenAsync(ResourceUri, ClientId, ReturnUri, AuthorizationParameters); var token = authResult.AccessToken;</p></li><li><p>tech.days 2015#mstechdaysSESSION</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>//Obtention du calendriervar Events = await outlookClient.Me.Calendar.Events</p><p>.Where(e =&gt; e.Start &gt;= startDate &amp;&amp; e.Start &lt; endDate).ExecuteAsync();</p><p>//Ajout dun rendez-vousEvent newEvent = new Event{</p><p>Subject = EventName,Location = location,Start = start, End = end</p><p>};await exchangeClient.Me.Events.AddEventAsync(newEvent); </p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>//Obtention de contactsvar contactsResults = await exchangeClient.Me.Contacts</p><p>.OrderBy(c =&gt; c.DisplayName).ExecuteAsync();</p><p>//Ajout dun contactContact newContact = new Contact{</p><p>GivenName = givenName,Surname = surname, JobTitle = jobTitle, MobilePhone1 = mobilePhone</p><p>}; await exchangeClient.Me.Contacts.AddContactAsync(newContact); </p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>//Obtention des mailsvar mails = await(from i in outlookClient.Me.Folders.GetById("Inbox").Messages</p><p>orderby i.DateTimeReceived descendingselect i).Skip((pgNo - 1) * pgSize).Take(pgSize).ExecuteAsync();</p><p>//Envoi de mailvar draft = new Message{</p><p>Subject = subject,Body = new ItemBody {ContentType = BodyType.Text,Content = bodyContent},ToRecipients = toRecipients</p><p>};await outlookClient.Me.SendMailAsync(draft, true); </p></li><li><p>tech.days 2015#mstechdaysSESSION</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>string requestUrl = string.Format("{0}/_api/lists/getbytitle('{1}')/items",SharepointUrl, listName);</p><p>var client = new HttpClient();client.DefaultRequestHeaders.Authorization =</p><p>new AuthenticationHeaderValue("Bearer", Token);HttpResponseMessage response = await client.GetAsync(new Uri(requestUrl));</p><p>var items = DeserializeItem(response)</p></li><li><p>tech.days 2015#mstechdaysSESSION</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>//Obtention des fichiersvar filesResults = await sharePointClient.Files.ExecuteAsync();</p><p>//Ajout dun fichierusing (var stream = await sFile.OpenStreamForReadAsync()){</p><p>File newFile = new File{Name = sFile.Name};await sharePointClient.Files.AddItemAsync(newFile);await sharePointClient.Files.GetById(newFile.Id).ToFile().UploadAsync(stream); </p><p>}</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>Scnarios dusage</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>Situation de mobilit</p><p>Prise de photo</p><p>Golocalisation</p><p>Agenda et Prise de rendez-vous automatique</p><p>Synchronisation hors-ligne</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>Documentation</p><p>Personalisation</p><p>Envoi de devis</p><p>Notification pour relance commerciale</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>Indicateurs</p><p>Supervision</p><p>Suivi dtaill</p></li><li><p>tech.days 2015#mstechdaysSESSION</p><p>Speakers : lois.gaudebert@ai3.frremi.aubert@ai3.fr</p></li><li><p>tech.days 2015#mstechdaysSESSION</p></li><li><p> 2015 Microsoft Corporation. All rights reserved. </p><p>tech days2015</p><p>#mstechdays techdays.microsoft.fr</p></li></ul>