Open Cpt-Falcon opened 4 years ago
Hi @serp777 ,
It's possible to pass a custom HttpClient
instance when creating WebDavClient
.
WebDavClient CreateClientWithAuth(string accessToken)
{
var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", accessToken);
return new WebDavClient(httpClient);
}
I hope it solves it.
In the web client params, we should be able to pass an AuthenticationHeaderValue to support MSAL, for example the following from the Microsoft MSAL tutorial
Currently this Web DAV Client does not support Microsoft sharepoint since I can't pass the needed access token as part of the header. I might add this in myself if it would be desired.