How to install LDAPCP

Important:
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"
$trust.Update()

Important

  • 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=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
$publish = New-Object System.EnterpriseServices.Internal.Publish
$publish.GacInstall("F:\Data\Dev\ldapcp.dll")