Connecting to SharePoint Online

The identity client runtime contained in the SharePoint Server 2013 client components is necessary for successful SharePoint authorization.

If you don’t have the runtime installed on your server machine, you can experience an issue with the msoidcliL.dll dynamic link library.

Learn what you need to do if you cannot connect to SharePoint Online due to the missing runtime when:

  • running Kentico in a standard environment
  • running Kentico in a Microsoft Azure environment

Connecting to SharePoint Online in a standard environment

If you cannot connect to SharePoint Online when running Kentico in a standard environment, download and install SharePoint Server 2013 Client Components SDK, available on the Microsoft website.

After installing the SharePoint Server 2013 client components, restart your application (by clicking Restart application in System -> General).

Connecting to SharePoint Online in a Microsoft Azure environment

If you cannot connect to SharePoint Online when running Kentico in a Microsoft Azure environment:

  1. Download the appropriate version of SharePoint Server 2013 Client Components SDK from the Microsoft website.

    • For example, if you are running Kentico on a 64 bit machine, download the sharepointclientcomponents_x64.msi installation file.
  2. Open your Azure project in Visual Studio.

  3. Create the startup.cmd batch file containing the following block of code:

    
    
    
     msiexec /i sharepointclientcomponents_VERSION.msi /q /log sharepointclientcomponentinstall.log
    
    
     
    • Replace _VERSION with the identification of the edition of your downloaded SharePoint Server 2013 client components, i.e. _x32 or _x64.
    • The code ensures that the system installs the client components.
  4. Add the following files to your Azure project’s CMS\ directory.

    • startup.cmd
    • sharepointclientcomponents_VERSION.msi
  5. Include these files into the project and set them to be copied to the output directory:

    1. Click Show All Files in the Solution Explorer toolbar.
    2. Right-click the file and select Include In Project.
    3. Right-click the file again and select Properties.
    4. In Properties, set Copy to Output Directory to Copy always.
    5. Repeat also for the other file.
  6. Open the CMSAzure\ServiceDefinition.csdef file.

  7. Add the following block of code to the file’s WebRole tag:

    
    
    
     <Startup>
        <Task commandLine="startup.cmd" executionContext="elevated" taskType="background" />
     </Startup>
    
    
     
    • The code ensures that the system executes the startup.cmd batch file on startup of the virtual machine on Azure.
  8. Save and close the file.

We apologize that we currently cannot provide a more straightforward solution. This is due to restrictions imposed on the distribution of the third-party software components.