OneDrive / onedrive-sdk-dotnet-msa-auth-adapter

Other
26 stars 22 forks source link

Authentication in Windows Service c# #43

Open Srusti-Thakkar opened 7 years ago

Srusti-Thakkar commented 7 years ago

I want to create windows service using c# for sync local directory with OneDrive. How to authenticate user in Windows Service and pass token to send request?

daboxu commented 7 years ago

hi @Srusti-Thakkar , you can see my example for ASP .NET web service: https://github.com/OneDrive/onedrive-sdk-dotnet-msa-auth-adapter/issues/21. The basically idea is implements the IAuthProvider interface from Microsoft.Graph.Core which you can pass in your access token.

toper commented 5 years ago

But Windows Service - does not have WebBrowser. Is it posible to authenticate in OneDrive from Windows Service or ConsoleApp ? There is no GUI for user. It's work automaticly in background.