I am trying to make a simple query to sharepoint online using Azure function created in VS2017.
My code looks like below:
List mylist = myweb.Lists.GetByTitle(listName);
CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml = "<View><Query><Where><Neq><FieldRef Name='RequestedForDeletion' /><Value Type='Boolean'>False</Value></Neq></Where></Query><ViewFields><FieldRef Name='LinkTitle' /><FieldRef Name='SiteUrl_x0028_alias_x0029_' /><FieldRef Name='RequestedForDeletion' /><FieldRef Name='CurrentStatus' /></ViewFields><QueryOptions /></View>";
ListItemCollection items = mylist.GetItems(camlQuery);
myclientContext.Load(items);
myclientContext.ExecuteQuery();
log.Info($"Empty items: {items.Count}");
It is the myclientContext.ExecuteQuery(); where I get error as : "The remote server returned an error: (400) Bad Request"
I am unable to understand the reason for this error. Any help or explanation.