
Hi @g h ,
Here is the sample code to get files' absolute url in library for your reference:
using (ClientContext ctx = new ClientContext("https://zheguo.sharepoint.com/sites/dev/"))
{
ctx.Credentials = new SharePointOnlineCredentials(account, secret);
ctx.Load(ctx.Web);
ctx.ExecuteQuery();
List targetList = ctx.Web.Lists.GetByTitle("Documents");
ListItemCollection ItemCol = targetList.GetItems(CamlQuery.CreateAllItemsQuery());
ctx.Load(ItemCol);
ctx.ExecuteQuery();
foreach (Microsoft.SharePoint.Client.ListItem item in ItemCol)
{
if (item.FileSystemObjectType == FileSystemObjectType.File)
{
Console.WriteLine(new Uri(ctx.Url).GetLeftPart(UriPartial.Authority) + item["FileRef"]);
}
}
}