A better SharePoint Connector – part 9: Improvements!

It has been quite a while since I completed the “A better SharePoint connector” series of articles. In part 6 of the series, I published the SharePoint connector source code. A good  and solid 1.0 version, but it was lacking some features….


I always wanted to say this: “Good news everyone!  I’ve published an update for the SharePoint Connector”.

What’s new or has improved in this version:

  • better support for SharePoint on-premise (impersonation is supported)
  • Item Level Security on files and folders, based on an array of passed in users
  • helper method to get the absolute folder url (folder root)
  • helper method to get relative path to file or folder inside document library
  • url handling made more robust

For your convenience, you can download the C# source code from here (published under the MIT license): File Attachment: SharePointConnector.2.0.zip (14 KB)

The SharePoint connector will grow over time. Happy coding!

4 thoughts on “A better SharePoint Connector – part 9: Improvements!

  1. Hello there! I think the code that you have written here may help me with a project I am working on to query the list of documents in SharePoint associated to a CRM record (in a specific doc library and folder), but I’m not quite sure how to implement what you have written. This is a C# / .NET WebAPI type app that will sit in azure between CRM and SharePoint.

    I’m basically trying to call the SharePoint online REST service to get the list of files in a folder.


    The trouble I am having is how to pass in credentials of a service account username and password, then run the REST query and process the results. If I call the REST I just get back a ‘401 UNAUTHORIZED’ error.

    Would it be possible for you to contact me via email so we can discuss?

  2. Fred says:

    Hi Bas,

    I need to connect Dynamics 365 Portals with Sharepoint Online.

    We want to use the rest api that comes with Sharepoint and handle the token internally.
    The point is that when we want to get the folder to list all the documents we are recieving an access denied result. Can you guid me how to configure or handle this situation.

Leave a Reply

Your email address will not be published. Required fields are marked *