Ejemplo n.º 1
0
 public SelectiveOneDriveClient()
 {
     // TODO: Creating the class should not cause this cascasing side effect of
     //       potential UI to request a token (should probably happen as part of an
     //       actual activity)
     _graphClient = new GraphServiceClient(
         "https://graph.microsoft.com/v1.0",
         new DelegateAuthenticationProvider(
             async(requestMessage) =>
     {
         //await MSALHelper.SignOut();
         var token = await MSALHelper.AcquireToken();
         requestMessage.Headers.Authorization = new AuthenticationHeaderValue("bearer", token);
     }));
 }
Ejemplo n.º 2
0
        public void StartSync()
        {
            _ = MSALHelper.AcquireToken();

            Task.Run(OneDriveSyncTask);
        }