U2U Caml Query Builder NullReferenceException Connection Error

Rob Hills 1 Reputation point
2022-04-21T20:45:04.77+00:00

Our tenant is hosted by SharePoint Online SPO via .sharepoint.com and our domain uses Active Directory Federation Services for authentication within and multifactor authentication when outside the domain. I'm receiving a NullReferenceException error when connecting to SPO within the domain. Our TEST tenant does not use AD FS and I can connect U2U to TEST with no issues. Below is the message from the error dialog box.

What must I do to connect through AD FS with this tool?

System.NullReferenceException: Object reference not set to an instance of an object.

at Wictor.Office365.MsOnlineClaimsHelper.getCookieContainer()

at Wictor.Office365.MsOnlineClaimsHelper.clientContext_ExecutingWebRequest(Object sender, WebRequestEventArgs e)

at Microsoft.SharePoint.Client.ClientRuntimeContext.OnExecutingWebRequest(WebRequestEventArgs args)

at Microsoft.SharePoint.Client.ClientContext.GetWebRequestExecutor()

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()

Thanks for your review!!!

Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tong Zhang_MSFT 9,251 Reputation points
    2022-04-22T03:56:11.263+00:00

    Hi @Rob Hills ,

    Thank you for the detailed case description. When I received the case, I searched a lot of documents did a lot of researches and test. And I feel regretful to inform you that U2U Caml Query Builder cannot connect to a SharePoint Online account with multi-factor authentication.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.