How to upload/download files from OneDrive in Xamarin Forms 3 App

mborsalinomborsalino Member ✭✭

I am developing an app with xamarin forms 3 where I need to upload and download files from OneDrive. I can't find any solution to this problem. I googled a lot but any solution based on Graph or Cloudrail API don't run. Is there ant good tutorial or code sample that solve this problem ? I can't believe that any others are in trouble like me. Thanks in advance to anyone can help me.


  • mborsalinomborsalino Member ✭✭

    I am trying to execute the sample on GitHub called /Azure-Samples/active-directory-xamarin-native-v2
    but i get exception on line 44 in the file active-directory-xamarin-native-v2/UserDetailsClient/UserDetailsClient/MainPage.xaml.cs

    AuthenticationResult ar = await App.PCA.AcquireTokenAsync(App.Scopes, App.UiParent);

    This sample use VS2017 v15.7.3
    Microsoft.Identity.Client version 1.1.4-preview0002
    Do not work on Android. I am testing through Xamarin Live on Samsung S7 with Oreo 8.0
    I create blank xamarin.forms solution using .net standard. I updated to xamarin.forms 3

    I can't understand why I get exception when executing AcquireTokenAsync

    Is there anyone getting the same issue ? Or better is there anyone able to solve this issue ?

  • mborsalinomborsalino Member ✭✭

    I got error when I start debugging with Xamarin Live Player. But when I start debugging with usb cable I don't get any exception and Xamarin-v2 sample runs without errors opening Chrome to insert Microsoft credential and password.
    All the problem I guess is in Live Player or something with wifi connection. I am not enough deep of xamarin stuff to understand. That's incredible that is enough switch to usb cable and all the exceptions are gone away.
    Now I able to identify a user with MSAL. Next step is to access OneDrive to get and upload files. Let's cross the fingers

  • rouge1nirouge1ni GBMember ✭✭✭

    Live Player is only for simple previews its not intended for full testing device this has been stated many many times on this forum.

Sign In or Register to comment.