How to install LDAPCP

Start a new PowerShell console to ensure the use of up to date persisted objects, which avoids concurrency update errors.
If something goes wrong, check this page to fix issues.

  • Download LDAPCP.wsp.
  • Install and deploy the solution:
Add-SPSolution -LiteralPath "F:\Data\Dev\LDAPCP.wsp"
Install-SPSolution -Identity "LDAPCP.wsp" -GACDeployment
  • Associate LDAPCP with a SPTrustedIdentityTokenIssuer:
$trust = Get-SPTrustedIdentityTokenIssuer "SPTRUST NAME"
$trust.ClaimProviderName = "LDAPCP"
  • Visit central administration > System Settings > Manage farm solutions: Wait until solution status shows “Deployed”.
  • Update assembly manually on SharePoint servers that do not run the service “Microsoft SharePoint Foundation Web Application” (see below for more details).
  • Restart IIS service and SharePoint timer service on each SharePoint server.
  • Configure LDAPCP for your environment.


  • Due to limitations of SharePoint API, do not associate LDAPCP with more than 1 SPTrustedIdentityTokenIssuer. Developers can bypass this limitation.

  • You must manually install ldapcp.dll in the GAC of SharePoint servers that do not run SharePoint service “Microsoft SharePoint Foundation Web Application”.

You can extract ldapcp.dll from LDAPCP.wsp using 7-zip, and install it in the GAC using this PowerShell script:

[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") | Out-Null
$publish = New-Object System.EnterpriseServices.Internal.Publish

    # Method Publish.GacRemove() removes the assembly from the GAC if it exists (for update scenarios)
    $existingAssembly = [System.Reflection.Assembly]::Load("ldapcp, Version=, Culture=neutral, PublicKeyToken=80be731bc1a1a740").Location
    Write-Host "Assembly $existingAssembly successfully removed."
} catch {}

# Adds assembly to the GAC
Write-Host "Assembly was successfully added to the GAC."