Unfortunately given the client and the client restrictions I cannot share the code. But I can share the resolution. The reason for the error is that the service account, has roles that were not accessible in SharePoint.
Lamar
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a C# class application that allows users to Upload and download files in SharePoint. Basically SharePoint is uses as a Filesserver
Uploading is fine, However when downloading the process is to to Search for a document via document ID retrieve the URL and then attempt to download the document. Unfortunately when doing the Search an Access denied is returned. We use a service account not the Users account credentials to authorize the download in SharePoint. The Service account has writes according to our SP admin. I can use the service account to download the document directly via the SharePoint URL. But the searching using the ExecuteQuery Causes the error
Unfortunately given the client and the client restrictions I cannot share the code. But I can share the resolution. The reason for the error is that the service account, has roles that were not accessible in SharePoint.
Lamar