I am trying to generate a query using U2U CAML Query Builder for a list on an app web (add-in web). When I try to connect using credentials of the current user, which can connect to app web in the UI, I get the following error message:

System.Net.WebException: The remote server returned an error: (403) Forbidden.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute()
at Microsoft.SharePoint.Client.ClientContext.GetFormDigestInfoPrivate()
at Microsoft.SharePoint.Client.ClientContext.EnsureFormDigest()
at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
at U2U.SharePoint.CAML.CSOM.CSOMSite.get_Title()
at U2U.CamlControlLibrary.SharePointHierarchyUserControl.AddWebHierarchy(QueryInfo queryInfo)
at U2U.CamlControlLibrary.SharePointHierarchyUserControl.Connect(QueryInfo queryInfo)
at U2U.CamlBuilder.MainForm.OpenSite()

Can someone recommend any other tool or tehnique to generate CAML queries for app web?


In the end, this error message was caused by SharePoint web application being configured to enable Windows authentication as well as one trusted Identity provider. So I guess CAML Query Builder got confused (or SharePoint maybe?).

Workaround for my problem was to copy folder containing the list to a new empty SharePoint farm solution, deploy the solution to host web (on a web application configured to use Windows authentication only), and then use CAML Query Builder to generate my query.

It is only a workaround so if anyone has a better answer I'll mark it as answer.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.