SharePoint online documents import into AX

I have got a requirement to import documents from SharePoint online to AX. (URL of the document will be stored in DocuRef table)

Did the above requirement in AX 2012 R3 and it is working fine.

Now working in AX7 to achieve the same. But most of the dll files are not there in AX7. Below is the code i wrote in C# for importing the documents.

Could anyone help me to achieve the same in AX7?

public ListItemCollection readFromLibrary(string site, string library, string qryXml)

{

ClientContext clientContext;

Web web;

List list;

clientContext = new Microsoft.SharePoint.Client.ClientContext(site);

clientContext.ExecutingWebRequest += new EventHandler(eventExecutingAsService);

web = clientContext.Web;

list = web.Lists.GetByTitle(library);

var q = new CamlQuery() { ViewXml = qryXml };

var r = list.GetItems(q);

clientContext.Load(r);

clientContext.ExecuteQuery();

return r;

}