Accessing SharePoint using OfficeDevPnP fails the first time

Copper Contributor

The first time after SharePoint is started the first call to ClientContext.ExecuteQuery() (in the Microsoft.SharePoint.Client namespace) using the OfficeDevPnP.Core library with SharePoint fails. I am using CertificateMixed authentication, so the call fails during the FedAuthCookie request. If I retry the call to Execute query it works OK. Is there a better workaround to this or should I just deal with the fact that occasionally it will fail on the first go? The ExecuteQueryRetry() extension method doesn't catch this particular failure because the exception is not one of the specific exceptions it catches.

 

Thanks.

0 Replies