Hello, I'm attempting to retrieve a file from SharePoint, and I'm using the following code to accomplish it.
//using SP = Microsoft.Dynamics.Platform.Integration.SharePoint;
System.UriBuilder builder = new System.UriBuilder("xxxxx.sharepoint.com");
str host = builder.Host;
System.Uri uri = new System.Uri('https://xxxxxx.sharepoint.com/sites/DmatrialisationUAT/Documents/Fichier XLSX/IN/myfile.xlsx');
str extId = xUserInfo::getExternalId();
SP.ISharePointProxy proxy = SP.SharePointHelper::CreateProxy(host,'sites/DmatrialisationUAT', extId);
str token = proxy.AccessToken;
SP.FileResults memoryStream = new SP.FileResults();
SP.FileContents File;
if(SP.SharePointHelper::VerifyAuthentication(proxy))
{
memoryStream = SP.SharePointHelper::GetFiles(proxy,"Documents/Fichier XLSX/IN","myfile.xlsx");
File = SP.SharePointHelper::GetFileContents(proxy, Uri);
}
However, I continue to receive this problem "URI must be a SharePoint API URI"