Using the Microsoft Graph C# SDK, I've gotten the DriveItem of a file a want:
DriveItem myDriveItem = await graphClient
.Sites[targetSite.Id]
.Lists[targetList.Id]
.Drive
.Items[targetItem.Id]
.Request()
.GetAsync();
Using the download link in it returns Error 407: Proxy Authentication Required.
using (var client = new WebClient())
{
outputText = client.DownloadString((string)myDriveItem
.AdditionalData["@microsoft.graph.downloadUrl"]);
}
If it helps, I'm trying to download an XML file from a Sharepoint form library. The link works when I use it in a browser. How do I download the file?