OneDrive / onedrive-sdk-csharp

OneDrive SDK for C#! https://dev.onedrive.com
Other
295 stars 145 forks source link

Onedrive SDK does not work with ADAL #219

Closed krackinDev closed 7 years ago

krackinDev commented 7 years ago

Microsoft has changed the ADAL approach and your ADAL Auth provider no longer works and is not exposed enough to overload or make our own wrapper/version without bringing all of your code. Any idea when the official one drive sdk will be updated so that it actually works with onedrive for business? it works fine in MSA login. Or at least allow us to overwrite authcontexts and not just a minor interface IAuthenticationProvider that completely hides what the wrapper does with headers etc. I have downloaded the source code for the onedrive sdk and will go around figuring it out at some point. Just would be nice for an "Official SDK" to actually work, as I am about to put a project, and this is really slowing me down this is really slowing me down. Also i see there have been no comments on this repo for many days on other issues so im probably beating a dead horse in trying to get info ......

daboxu commented 7 years ago

@krackinDev thanks for the updates, I will look into the ADAL issue.

nsouren commented 7 years ago

Any news on this issue?

krackinDev commented 7 years ago

@nsouren Yes i have resolved this now by using the Graph SDK here , it is now enabled for both onedrive and onedrive for business, as far as i know they are going to replace all onedrive apis with this. It actually works quite well.

nsouren commented 7 years ago

I am using the latest OneDrive C# SDK available on nuget, it is v2.0.6 and it does not work with ADAL authentication. Which version I should use and where can get it from? Thanks.

krackinDev commented 7 years ago

You should change your SDK completely by using the Graph SDK here there are plenty of samples on there. the only real difference is adding the reference to me in it , it really shouldnt take long to change. other than maybe the authentication. eg _graphclient.Me.Drive.Items[item.ParentReference.Id].Request().GetAsync()

nsouren commented 7 years ago

@krackinDev could you please give me a hint how you are authenticating through ADAL? I am using AdalAuthenticationProvider class from Microsoft.OneDrive.Sdk.Authentication library, and it does authenticate, but I am unable to use that provider with Graph SDK. I am getting "Access token validation failure." error. Thanks in advance.