OneDrive / onedrive-sdk-csharp

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

Possible to use AuthenticationContext #215

Closed kevitra closed 7 years ago

kevitra commented 7 years ago

Is it possible to use the Azure AD AuthenticationContext in some manner to create a OneDrive SDK object?

In our app we currently authorize with: AuthenticationContext authContext = await authContext.AcquireTokenAsync(graphResourceId, clientId, redirectUri, new PlatformParameters(PromptBehavior.Never));

//need provider var oneDriveClient = new OneDriveClient("https://api.onedrive.com/v1.0", );

I've seen the examples with Msa and Adal but we are wondering if we can use what we currently have.

Thanks

daboxu commented 7 years ago

hi @kevitra , I think the ADALAuthenticationProvider under our MSAAuthProvider should work for you because it allows you pass in an AuthenticationContext object. Give it a shot and let me know if you have any problems.

daboxu commented 7 years ago

feel free to reopen it if you have any question.