Quantcast
Channel: LDAP/AD Claims Provider For SharePoint
Viewing all 270 articles
Browse latest View live

New Post: Due to limitations of SharePoint API, do not associate LDAPCP with more than 1 SPTrustedIdentityTokenIssuer

$
0
0
Hi Yvand

I have 2 Trusted Identity Token Issuer
TrustedID1 and TrustedID2

After associated with TrustedID1, and everything is working. I know about this warning but accidently associate LDAPCP again with the other TrustedID2. after that I can no longer access any web site (authenticate with Trusted Identity Token Issuer)

I have tried to removed followed "HOW to remove LDAPCP" steps and then reinstalled and deployed the solution successfully.
I had associated LDAPCP to TrustedID1 token issuer

but I still see this message in LDAPCP configuration page

"LDAPCP is currently not associated with any TrustedLoginProvider. It is mandatory because it cannot create permission for a trust if it is not associated to it.
Visit http://ldapcp.codeplex.com/ to see how to associate it.
Settings on this page will not be available as long as LDAPCP will not associated to a trust
."

Thanks in advance for any advice that you can give to help me to clean this up.

Swanl

New Post: Due to limitations of SharePoint API, do not associate LDAPCP with more than 1 SPTrustedIdentityTokenIssuer

$
0
0
I got this resolved. the only way to unregister the claim provider is to remove the Trusted Token Issuer and re-create it new again

I should not need to remove LDAPCP at all

I am good now

Thanks

New Post: LDAPS and error 0x80005000

$
0
0
Hello folks,

I am able to add a new LDAP connection with a path of LDAP://<IP address of DC>/DC=Orgname,DC=local and test the connection to be good. However, when I switch to LDAPS by using LDAPS://<IP address of DC>/DC=Orgname,DC=local and testing, the connection is established and immediately returns the error
Unable to connect to LDAP for following reason:
Unknown error (0x80005000)
It may be expected if w3wp process of central admin has intentionally no access to LDAP server. 
This error occurs regardless of whether I select Secure and/or Encryption for authentication type. Using Secure and/or Encryption for auth type under a standard LDAP connection appears to not use StartTLS and produces the error "The server is not operational."

Has anyone else had any luck with LDAPS in LDAPCP? Any thoughts on what I might try to diagnose this issue?

Thanks,
ckindley

New Post: LDAP filtering and the OR operator

$
0
0
Hello folks,

I have configured LDAPCP in a test environment to connect to a non-domain LDAP server. I was attempting to apply a filter to only retrieve results for objects that are members of one of two security groups (and the groups exist in different domains). Using a filter similar to the example provided:
(!(objectClass=computer))(memberOf=CN=ADFSMSPROJECT,OU=Security Groups,DC=OrgNameA,DC=local)
I see only results for users who are members of the security group ADFSMSPROJECT as expected.

When I complicate the filter a bit, for instance:
(!(objectClass=computer))((memberOf=CN=ADFSMSPROJECT,OU=Security Groups,DC=OrgNameA,DC=local)|(memberOf=CN=ADFSMSPROJECT,OU=Security Groups,OU=MyBusiness,DC=OrgNameB,DC=local))
I see no results returned. Even users who would have been recognized in application of the first filter are no longer found.

Did I miss some part of the syntax, or is there something else I am breaking with this filter? Is there a better strategy to limit user recognition when working with multiple domains?

New Post: Due to limitations of SharePoint API, do not associate LDAPCP with more than 1 SPTrustedIdentityTokenIssuer

$
0
0
Hello,
I agree with you, but this is entirely caused by SharePoint that doesn't offer a convenient way to remove a claims provider from a SPTrustedIdentityTokenIssuser
thanks,
Yvan

New Post: LDAP filtering and the OR operator

$
0
0
Hello,
you can filter SharePoint logs on product/area "LDAPCP" and you'll see the exact LDAP query submitted.
Then you can replay/analyze it to understand why it's not working.
Thanks,
Yvan

New Post: LDAPS and error 0x80005000

$
0
0
Hello,
you can filter SharePoint logs on product/area "LDAPCP" to get more information on the error.
You should also try to use the options like "Secure" when you create the LDAP connection.
Thanks,
Yvan

New Post: LDAPS and error 0x80005000

$
0
0
Hello Yvand,

Thanks for the advice. I do not see the failed connection attempts in the logs, however, and have ensured I have configured the LDAPCP monitoring to log verbosely. I do see LDAPCP events in the logs, just nothing related to the connection attempt.

Is there something else I should be looking for, or some way to actually see what is going wrong with this connection?

Thank you,
ckindley

New Post: LDAP filtering and the OR operator

$
0
0
Hello Yvand,

Thanks for the tip. I was able to successfully review logs to identify the error in my LDAP filter syntax. The OR bar ( | ) must be placed before the two logical statements:
(!(objectClass=computer))(|(memberOf=CN=ADFSMSPROJECT,OU=Security Groups,DC=OrgNameA,DC=local)(memberOf=CN=ADFSMSPROJECT,OU=Security Groups,OU=MyBusiness,DC=OrgNameB,DC=local))
This syntax works successfully. Lesson learned: more coffee before LDAP.

Thanks,
ckindley

New Post: Don't show Windows Accounts in the people picker when SAML and AD auth are enabled on a zone?

$
0
0
Hi

have you ever tried Yvand solution and how it work out for you?

Thanks

Suanl

Updated Wiki: Billet temporaire utilisé pour la détection de thème (2481904a-83d1-46dc-968c-aa65c040fd7f - 3bfe001a-32de-4114-a6b4-4005b770f6d7)

$
0
0

Il s'agit d'un billet temporaire qui n'a pas été supprimé. Supprimez-le manuellement. (2579421a-c6aa-4c4b-bf0b-109f5de5ea84 - 3bfe001a-32de-4114-a6b4-4005b770f6d7)

Updated Wiki: Home

$
0
0

This claims provider queries Active Directory or any LDAP to add search capabilities to the people picker in trusted authentication (typically ADFS).

Joe boss 

Features

It is highly customizable through administration pages added in Central administration/Security:

  • Works with SharePoint 2013 and SharePoint 2016 RC.
  • Connect to multiple LDAP / AD in parallel (multi-threaded requests).
  • Customize display of permissions.
  • Populate properties of users when they are added from the people picker.
  • Customize list of claim types, and their mapping with LDAP attributes.
  • Set custom LDAP filters for specific claim types, e.g. to only return users that are member of a specific security group.
  • Set a keyword to bypass LDAP lookup. e.g. input "extuser:partner@contoso.com" directly creates permission "partner@contoso.com" on claim type set for this.
  • Set a prefix to add to LDAP results, e.g. add "domain\" to groups returned by LDAP.
  • Supports rehydration for provider hosted apps.

Important - Limitations

Due to limitations of SharePoint API,do not associate LDAPCP with more than 1 SPTrustedIdentityTokenIssuer. Developers can bypass this limitation by inheriting LDAPCP to create new claims providers (with different names). Read “Developers section” below for further information.

If a SharePoint server does not have SharePoint service “Microsoft SharePoint Foundation Web Application” started, ldapcp.dll assembly will not be deployed in its GAC. In that case, you must manually add it or some features may not work. In SharePoint 2013 (.NET 4.5), the GAC is located in C:\Windows\Microsoft.NET\assembly.

Version 2 is a critical update that ensures thread safety and fully implements SharePoint logging infrastructure (messages are recorded in Area/Product "LDAPCP"). Its logging level can be customized with PowerShell or Central Administration.

How to install LDAPCP

Install and deploy the solution (that will automatically activate the “LDAPCP” farm-scoped feature):

Add-SPSolution -LiteralPath "PATH TO WSP FILE"
Install-SPSolution -Identity "LDAPCP.wsp"-GACDeployment

At this point claim provider is inactive and it must be associated to an SPTrustedIdentityTokenIssuer to work:

$trust = Get-SPTrustedIdentityTokenIssuer "SPTRUST NAME"$trust.ClaimProviderName ="LDAPCP"$trust.Update()

How to update LDAPCP

Run Update-SPSolution cmdlet to start a timer job that that will deploy the update. You can monitor the progression in farm solutions page in central administration.

Update-SPSolution -GACDeployment -Identity "LDAPCP.wsp" -LiteralPath "C:\Data\Dev\LDAPCP.wsp"

How to remove LDAPCP

For an unknown reason, randomly SharePoint 2013 doesn’t uninstall correctly the solution because it removes assembly from the GAC before calling the feature receiver... When this happens, the claims provider is not removed and that causes issues when you re-install it.
To uninstall safely, deactivate the farm feature before retracting the solution:

Disable-SPFeature -identity "LDAPCP"
Uninstall-SPSolution -Identity "LDAPCP.wsp"
Remove-SPSolution -Identity "LDAPCP.wsp"

Validate that claims provider was removed: "Get-SPClaimProvider| ft DisplayName". If LDAPCP appears, remove it: "Remove-SPClaimProvider LDAPCP"

Claims supported

LDAPCP has a default mapping between claim types and LDAP attributes, but this can be customized in “Claims table” page available in Central Administration/Security.
Default list is following:

Claim typeLDAP attribute nameLDAP object class
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddressmailuser
http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountnamesAMAccountNameuser
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upnuserPrincipalNameuser
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givennamegivenNameuser
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/localityphysicalDeliveryOfficeNameuser
http://schemas.microsoft.com/ws/2008/06/identity/claims/rolesAMAccountNamegroup
linked to identity claimdisplayNameuser
linked to identity claimcnuser
linked to identity claimsnuser

None of the claim types above is mandatory in the SPTrust, but the identity claim must either be one of them, or added through LDAPCP admin pages.

Note that you should never have 2 identical claim types in the list, this would cause issues.

To enhance search experience, LDAPCP also queries user input against common LDAP attributes such as the display name (displayName) and the common name (cn).

Developers corner

Project has evolved a lot since the beginning, and now 99% of all possible customizations can be made with LDAPCP administration pages in standard solution. Possible customizations not covered by standard package that can be achieved with "LDAPCP for Developers.zip" are:

  • Use LDAPCP in multiple trusts (SPTrustedIdentityTokenIssuer objects), so that each trust has a claim provider with a unique name.
  • Customize the display text or the value of permissions created by LDAPCP

"LDAPCP for Developers.zip" contains a Visual Studio project with sample classes that cover various use-case scenarios. Only 1 inherited claim provider is installed at a time, you need to edit the feature event receiver to install the claim provider you want to test.
Common mistakes to avoid:

  • Always deactivate the farm feature before retracting the solution (see "how to remove" above to understand why).
  • When you create your own SharePoint solution, DO NOT forget to include the ldapcp.dll assembly in the wsp package.

If you did any of the mistakes above, you will likely experience issues when you try to redeploy the solution because the feature was already installed. All features in the solution must be uninstalled before it can be redeployed.

In any case, DO NOT directly edit LDAPCP class, it has been designed to be inherited so that you can customize it to fit your needs. If a scenario that you need is not covered, please submit it in the discussions tab.



Updated Wiki: Home

$
0
0

This claims provider queries Active Directory or any LDAP to add search capabilities to the people picker in trusted authentication (typically ADFS).

Joe boss 

Features

  • Works with SharePoint 2013 and SharePoint 2016 RC.
  • Easy to configure through administration pages added in Central administration > Security.
  • Connects to multiple LDAP / AD in parallel (multi-threaded requests).
  • Populates properties (e.g. email, SIP, display name) when permission is created.
  • Supports rehydration for provider-hosted add-ins.
  • Supports dynamics tokens “{domain}” and “{fqdn}” to add domain information on permissions to create.

Customization capabilities

  • Customize list of claim types, and their mapping with LDAP objects.
  • Customize display of permissions.
  • Set custom LDAP filters for specific claim types, e.g. to only return users that are member of a specific security group.
  • Set a keyword to bypass LDAP lookup. e.g. input "extuser:partner@contoso.com" directly creates permission "partner@contoso.com" on claim type set for this.
  • Set a prefix to add to LDAP results, e.g. add "domain\" to groups returned by LDAP.
  • LDAP filter can be customized per claim type.

Important - Limitations

Due to limitations of SharePoint API,do not associate LDAPCP with more than 1 SPTrustedIdentityTokenIssuer. Developers can bypass this limitation by inheriting LDAPCP to create new claims providers (with different names). Read “Developers section” below for further information.

If a SharePoint server does not have SharePoint service “Microsoft SharePoint Foundation Web Application” started, ldapcp.dll assembly will not be deployed in its GAC. In that case, you must manually add it or some features may not work. In SharePoint 2013 (.NET 4.5), the GAC is located in C:\Windows\Microsoft.NET\assembly.

Version 2 is a critical update that ensures thread safety and fully implements SharePoint logging infrastructure (messages are recorded in Area/Product "LDAPCP"). Its logging level can be customized with PowerShell or Central Administration.

How to install LDAPCP

Install and deploy the solution (that will automatically activate the “LDAPCP” farm-scoped feature):

Add-SPSolution -LiteralPath "PATH TO WSP FILE"
Install-SPSolution -Identity "LDAPCP.wsp"-GACDeployment

At this point claim provider is inactive and it must be associated to an SPTrustedIdentityTokenIssuer to work:

$trust = Get-SPTrustedIdentityTokenIssuer "SPTRUST NAME"$trust.ClaimProviderName ="LDAPCP"$trust.Update()

How to update LDAPCP

Run Update-SPSolution cmdlet to start a timer job that that will deploy the update. You can monitor the progression in farm solutions page in central administration.

Update-SPSolution -GACDeployment -Identity "LDAPCP.wsp" -LiteralPath "C:\Data\Dev\LDAPCP.wsp"

How to remove LDAPCP

For an unknown reason, randomly SharePoint 2013 doesn’t uninstall correctly the solution because it removes assembly from the GAC before calling the feature receiver... When this happens, the claims provider is not removed and that causes issues when you re-install it.
To uninstall safely, deactivate the farm feature before retracting the solution:

Disable-SPFeature -identity "LDAPCP"
Uninstall-SPSolution -Identity "LDAPCP.wsp"
Remove-SPSolution -Identity "LDAPCP.wsp"

Validate that claims provider was removed: "Get-SPClaimProvider| ft DisplayName". If LDAPCP appears, remove it: "Remove-SPClaimProvider LDAPCP"

Claims supported

LDAPCP has a default mapping between claim types and LDAP attributes, but this can be customized in “Claims table” page available in Central Administration/Security.
Default list is following:

Claim typeLDAP attribute nameLDAP object class
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddressmailuser
http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountnamesAMAccountNameuser
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upnuserPrincipalNameuser
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givennamegivenNameuser
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/localityphysicalDeliveryOfficeNameuser
http://schemas.microsoft.com/ws/2008/06/identity/claims/rolesAMAccountNamegroup
linked to identity claimdisplayNameuser
linked to identity claimcnuser
linked to identity claimsnuser

None of the claim types above is mandatory in the SPTrust, but the identity claim must either be one of them, or added through LDAPCP admin pages.

Note that you should never have 2 identical claim types in the list, this would cause issues.

To enhance search experience, LDAPCP also queries user input against common LDAP attributes such as the display name (displayName) and the common name (cn).

Developers corner

Project has evolved a lot since the beginning, and now 99% of all possible customizations can be made with LDAPCP administration pages in standard solution. Possible customizations not covered by standard package that can be achieved with "LDAPCP for Developers.zip" are:

  • Use LDAPCP in multiple trusts (SPTrustedIdentityTokenIssuer objects), so that each trust has a claim provider with a unique name.
  • Customize the display text or the value of permissions created by LDAPCP

"LDAPCP for Developers.zip" contains a Visual Studio project with sample classes that cover various use-case scenarios. Only 1 inherited claim provider is installed at a time, you need to edit the feature event receiver to install the claim provider you want to test.
Common mistakes to avoid:

  • Always deactivate the farm feature before retracting the solution (see "how to remove" above to understand why).
  • When you create your own SharePoint solution, DO NOT forget to include the ldapcp.dll assembly in the wsp package.

If you did any of the mistakes above, you will likely experience issues when you try to redeploy the solution because the feature was already installed. All features in the solution must be uninstalled before it can be redeployed.

In any case, DO NOT directly edit LDAPCP class, it has been designed to be inherited so that you can customize it to fit your needs. If a scenario that you need is not covered, please submit it in the discussions tab.



Updated Wiki: Home

$
0
0

This claims provider queries Active Directory or any LDAP to add search capabilities to the people picker in trusted authentication (typically ADFS).

Joe boss 

Features

  • Works with SharePoint 2013 and SharePoint 2016 RC.
  • Easy to configure through administration pages added in Central administration > Security.
  • Connects to multiple LDAP / AD in parallel (multi-threaded requests).
  • Populates properties (e.g. email, SIP, display name) when permission is created.
  • Supports rehydration for provider-hosted add-ins.
  • Supports dynamics tokens “{domain}” and “{fqdn}” to add domain information on permissions to create.

Customization capabilities

  • Customize list of claim types, and their mapping with LDAP objects.
  • Customize display of permissions.
  • LDAP filter can be customized per claim type, e.g. to only return users member of a specific security group.
  • Set a keyword to bypass LDAP lookup. e.g. input "extuser:partner@contoso.com" directly creates permission "partner@contoso.com" on claim type set for this.
  • Set a prefix to add to LDAP results, e.g. add "domain\" to groups returned by LDAP.
  • Disabled users and distribution lists can be hidden.
  • Developers can easily make a lot more customization by inheriting base class. See below for more details.

Important - Limitations

Due to limitations of SharePoint API,do not associate LDAPCP with more than 1 SPTrustedIdentityTokenIssuer. Developers can bypass this limitation by inheriting LDAPCP to create new claims providers (with different names). Read “Developers section” below for further information.

If a SharePoint server does not have SharePoint service “Microsoft SharePoint Foundation Web Application” started, ldapcp.dll assembly will not be deployed in its GAC. In that case, you must manually add it or some features may not work. In SharePoint 2013 and SharePoint 2016 (.NET 4.5), the GAC is located in C:\Windows\Microsoft.NET\assembly.

Version 2 is a critical update that ensures thread safety and fully implements SharePoint logging infrastructure (messages are recorded in Area/Product "LDAPCP"). Its logging level can be customized with PowerShell or Central Administration.

How to install LDAPCP

Install and deploy the solution (that will automatically activate the “LDAPCP” farm-scoped feature):

Add-SPSolution -LiteralPath "PATH TO WSP FILE"
Install-SPSolution -Identity "LDAPCP.wsp"-GACDeployment

At this point claim provider is inactive and it must be associated to an SPTrustedIdentityTokenIssuer to work:

$trust = Get-SPTrustedIdentityTokenIssuer "SPTRUST NAME"$trust.ClaimProviderName ="LDAPCP"$trust.Update()

How to update LDAPCP

Run Update-SPSolution cmdlet to start a timer job that that will deploy the update. You can monitor the progression in farm solutions page in central administration.

Update-SPSolution -GACDeployment -Identity "LDAPCP.wsp" -LiteralPath "C:\Data\Dev\LDAPCP.wsp"

How to remove LDAPCP

For an unknown reason, randomly SharePoint 2013 doesn’t uninstall correctly the solution because it removes assembly from the GAC before calling the feature receiver... When this happens, the claims provider is not removed and that causes issues when you re-install it.
To uninstall safely, deactivate the farm feature before retracting the solution:

Disable-SPFeature -identity "LDAPCP"
Uninstall-SPSolution -Identity "LDAPCP.wsp"
Remove-SPSolution -Identity "LDAPCP.wsp"

Validate that claims provider was removed: "Get-SPClaimProvider| ft DisplayName". If LDAPCP appears, remove it: "Remove-SPClaimProvider LDAPCP"

Claims supported

LDAPCP has a default mapping between claim types and LDAP attributes, but this can be customized in “Claims table” page available in Central Administration/Security.
Default list is following:

Claim typeLDAP attribute nameLDAP object class
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddressmailuser
http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountnamesAMAccountNameuser
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upnuserPrincipalNameuser
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givennamegivenNameuser
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/localityphysicalDeliveryOfficeNameuser
http://schemas.microsoft.com/ws/2008/06/identity/claims/rolesAMAccountNamegroup
linked to identity claimdisplayNameuser
linked to identity claimcnuser
linked to identity claimsnuser

None of the claim types above is mandatory in the SPTrust, but the identity claim must either be one of them, or added through LDAPCP admin pages.

Note that you should never have 2 identical claim types in the list, this would cause issues.

To enhance search experience, LDAPCP also queries user input against common LDAP attributes such as the display name (displayName) and the common name (cn).

Developers corner

Project has evolved a lot since the beginning, and now 99% of all possible customizations can be made with LDAPCP administration pages in standard solution. Possible customizations not covered by standard package that can be achieved with "LDAPCP for Developers.zip" are:

  • Use LDAPCP in multiple trusts (SPTrustedIdentityTokenIssuer objects), so that each trust has a claim provider with a unique name.
  • Customize the display text or the value of permissions created by LDAPCP

"LDAPCP for Developers.zip" contains a Visual Studio project with sample classes that cover various use-case scenarios. Only 1 inherited claim provider is installed at a time, you need to edit the feature event receiver to install the claim provider you want to test.
Common mistakes to avoid:

  • Always deactivate the farm feature before retracting the solution (see "how to remove" above to understand why).
  • When you create your own SharePoint solution, DO NOT forget to include the ldapcp.dll assembly in the wsp package.

If you did any of the mistakes above, you will likely experience issues when you try to redeploy the solution because the feature was already installed. All features in the solution must be uninstalled before it can be redeployed.

In any case, DO NOT directly edit LDAPCP class, it has been designed to be inherited so that you can customize it to fit your needs. If a scenario that you need is not covered, please submit it in the discussions tab.



Updated Wiki: Home

$
0
0

This claims provider queries Active Directory and LDAP servers to enhance people picker with a great search experience in trusted authentication (typically ADFS).

Joe boss 

Features

  • Works with SharePoint 2013 and SharePoint 2016.
  • Easy to configure with administration pages added in Central administration > Security.
  • Queries multiple servers in parallel (multi-threaded connections).
  • Populates properties (e.g. email, SIP, display name) upon permission creation.
  • Supports rehydration for provider-hosted add-ins.
  • Supports dynamics tokens “{domain}” and “{fqdn}” to add domain information on permissions to create.

Customization capabilities

  • Customize list of claim types, and their mapping with LDAP objects.
  • Customize display of permissions.
  • Customize LDAP filter per claim type, e.g. to only return users member of a specific security group.
  • Set a keyword to bypass LDAP lookup. e.g. input "extuser:partner@contoso.com" directly creates permission "partner@contoso.com" on claim type set for this.
  • Set a prefix to add to LDAP results, e.g. add "domain\" to groups returned by LDAP.
  • Hide disabled users and distribution lists.
  • Developers can easily do a lot more by inheriting base class. See below for more details.

Important - Limitations

Due to limitations of SharePoint API,do not associate LDAPCP with more than 1 SPTrustedIdentityTokenIssuer. Developers can bypass this limitation by inheriting LDAPCP to create new claims providers (with different names). Read “Developers section” below for further information.

If a SharePoint server does not have SharePoint service “Microsoft SharePoint Foundation Web Application” started, ldapcp.dll assembly will not be deployed in its GAC. In that case, you must manually add it or some features may not work. In SharePoint 2013 and SharePoint 2016 (.NET 4.5), the GAC is located in C:\Windows\Microsoft.NET\assembly.

Version 2 is a critical update that ensures thread safety and fully implements SharePoint logging infrastructure (messages are recorded in Area/Product "LDAPCP"). Its logging level can be customized with PowerShell or Central Administration.

How to install LDAPCP

Install and deploy the solution (that will automatically activate the “LDAPCP” farm-scoped feature):

Add-SPSolution -LiteralPath "PATH TO WSP FILE"
Install-SPSolution -Identity "LDAPCP.wsp"-GACDeployment

At this point claim provider is inactive and it must be associated to an SPTrustedIdentityTokenIssuer to work:

$trust = Get-SPTrustedIdentityTokenIssuer "SPTRUST NAME"$trust.ClaimProviderName ="LDAPCP"$trust.Update()

How to update LDAPCP

Run Update-SPSolution cmdlet to start a timer job that that will deploy the update. You can monitor the progression in farm solutions page in central administration.

Update-SPSolution -GACDeployment -Identity "LDAPCP.wsp" -LiteralPath "C:\Data\Dev\LDAPCP.wsp"

How to remove LDAPCP

For an unknown reason, randomly SharePoint 2013 doesn’t uninstall correctly the solution because it removes assembly from the GAC before calling the feature receiver... When this happens, the claims provider is not removed and that causes issues when you re-install it.
To uninstall safely, deactivate the farm feature before retracting the solution:

Disable-SPFeature -identity "LDAPCP"
Uninstall-SPSolution -Identity "LDAPCP.wsp"
Remove-SPSolution -Identity "LDAPCP.wsp"

Validate that claims provider was removed: "Get-SPClaimProvider| ft DisplayName". If LDAPCP appears, remove it: "Remove-SPClaimProvider LDAPCP"

Claims supported

LDAPCP has a default mapping between claim types and LDAP attributes, but this can be customized in “Claims table” page available in Central Administration/Security.
Default list is following:

Claim typeLDAP attribute nameLDAP object class
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddressmailuser
http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountnamesAMAccountNameuser
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upnuserPrincipalNameuser
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givennamegivenNameuser
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/localityphysicalDeliveryOfficeNameuser
http://schemas.microsoft.com/ws/2008/06/identity/claims/rolesAMAccountNamegroup
linked to identity claimdisplayNameuser
linked to identity claimcnuser
linked to identity claimsnuser

None of the claim types above is mandatory in the SPTrust, but the identity claim must either be one of them, or added through LDAPCP admin pages.

Note that you should never have 2 identical claim types in the list, this would cause issues.

To enhance search experience, LDAPCP also queries user input against common LDAP attributes such as the display name (displayName) and the common name (cn).

Developers corner

Project has evolved a lot since the beginning, and now 99% of all possible customizations can be made with LDAPCP administration pages in standard solution. Possible customizations not covered by standard package that can be achieved with "LDAPCP for Developers.zip" are:

  • Use LDAPCP in multiple trusts (SPTrustedIdentityTokenIssuer objects), so that each trust has a claim provider with a unique name.
  • Customize the display text or the value of permissions created by LDAPCP

"LDAPCP for Developers.zip" contains a Visual Studio project with sample classes that cover various use-case scenarios. Only 1 inherited claim provider is installed at a time, you need to edit the feature event receiver to install the claim provider you want to test.
Common mistakes to avoid:

  • Always deactivate the farm feature before retracting the solution (see "how to remove" above to understand why).
  • When you create your own SharePoint solution, DO NOT forget to include the ldapcp.dll assembly in the wsp package.

If you did any of the mistakes above, you will likely experience issues when you try to redeploy the solution because the feature was already installed. All features in the solution must be uninstalled before it can be redeployed.

In any case, DO NOT directly edit LDAPCP class, it has been designed to be inherited so that you can customize it to fit your needs. If a scenario that you need is not covered, please submit it in the discussions tab.



Updated Release: LDAPCP v3.9 (nov. 05, 2015)

$
0
0
Changes in version 3.9 (published 05/11/2015)
- Fixed NullReferenceException bug that occurred with specific LDAP servers like Tivoli
- LDAPCP can now dynamically append FQDN to LDAP results when it creates permission, using token {fqdn}
- Minor improvements

Changes in version 3.8 (published 09/09/2015)
- An attempt to get LDAP object is now performed even if input was potentially submitted with a keyword that bypasses LDAP lookup
- Fixed a bug where LDAPCP may display permissions in web apps where it is not used

Changes in version 3.7 (published 11/02/2015)
- Implemented SupportsUserKey to support rehydration for provider hosted apps
- Updated logging

Changes in version 3.6 (published 14/01/2015)
- Fixed incorrect test on metadata field while creating item in claims table page
Validated new features added by itsystemsGuy:
- Added in the functionality to search by group attributes (i.e displayName).
- Added in timeout logic so LDAP queries will only run for a certain period of time before failing. The default is 10 seconds for new deployments and can be set in LDAPCP config page.
- Added in logic so that a domain token can be used as a prefix which will then replace {domain} with the relevant domain associated to the search result.

Changes in version 3.4 (published 06/11/2014)
- Improvements in claims table page
- Fixed bug in text description
- Now permission metadata can be set on any SPClaimEntityTypes (not only User)

Changes in version 3.3 (published 12/08/2014)
- Fixed incorrect value of parameter isIdentityClaimType in overridable method FormatPermissionValue
- Fixed permission validation issue when AlwaysResolveUserInput is set to true. Now, if this property is set to true, LDAP lookup is completely bypassed

Changes in version 3.2 (published 18/07/2014)
Added 2 overridable methods to allow customization of value and display text of permissions. This makes some customization a lot easier (see class LDAPCP_CustomResolution in LDAPCP for Developers for more details)

Changes in version 3.1 (published 11/07/2014)
Connection to LDAP servers is now multi-threaded (using Parallel Library only available in .NET 4+)

Changes in version 3.0 (published 08/07/2014)
Rewrote important parts of the code to be smarter, faster and more reliable.
Include various bug fixes
This is also the last version sharing the same code than LDAPCP 2010

Changes in version 2.2 (published 05/06/2014)
Fixed a minor bug that prevented LDAPCP to return results from central administration in rare scenarios

Changes in version 2.1 (published 05/06/2014)
Updated LDAPCP administration pages to:
- Connect to multiple LDAP / AD
- Set a keyword to resolve an input without LDAP lookup
- Set a prefix to add to a value returned by LDAP
And other minor improvements

Changes in version 2.0 (published 15/05/2014)
Fixed bug with multithreading: Results collections used by LDAPCP were shared by every thread. As a result, in very rare cases (issues were reported only with Project when it synchronized permissions between PWA and projects sites), and sometimes (< 1%) permission was created with values of another user.
Full integration of LDAPCP logging with SharePoint logging infrastructure
Improved admin "claims table" page with new options and improved layout

Changes in version 1.11 (published 22/04/2014)
New option to filter exact match only
New option to specify a custom LDAP filter individually for each LDAP attribute
Minor optimizations
Added new options in LDAPCP admin pages
Now by default computer accounts are excluded from results list

Changes in version 1.10 (published 27/03/2014)
Improved logging with a dedicated Area (LDAPCP) and a dedicated event id (1337)
Fixed memory leak issue
Some optimizations to improve performance
Better management of permissions metadata

Changes in version 1.9 (published 12/11/2013)
Minor optimizations in the code
Removed messages related to metadata of permission from ULS logging, which tended to flood the logs
added parameters "context" and "entityTypes" in method SetLDAPConnections to cover new scenarios for developers

Changes in version 1.8.0.0 (published 23/09/2013)
Many changes on the code to improve resilience and better support customizations of developers (especially when connecting to multiple LDAP servers)
added new property "LDAPAttributeToDisplay" to customize display text of each claim type
updated general admin page
added new LDAP attribute "sn" to search users with their last name
improved logging
minor bug fixes

Changes in version 1.7.0.0 (published 13/05/2013)
Added a new administration page to customize claims list
Fixed: minor bug that could occur with attributes set to be resolved as identity claim

Changes in version 1.6.0.0 (published 17/04/2013)
Fixed: bug when creating a SPClaimTypeMapping with a LocalClaimType different than IncomingClaimType

Changes in version 1.5.0.0 (published 28/03/2013)
New: Added ability to connect to LDAP in ServerBind authentication mode
New: Added option to exclude AD distribution lists from LDAP lookup

Changes in version 1.4.0.0 (published 21/03/2013)
Improved: Dramatic performance improvement of LDAP lookup by not using wildcard in front of search terms by default, which allows LDAP to use its indexes to speed up the lookup
New: Added option to choose to add or not a wildcard in front of search terms by default
New: Searches additional attributes to populate metadata of permission created (title, phone and SIP address)

Changes in version 1.3.0.0 (published 19/02/2013)
Fixed: sAMAccountName LDAP attribute is linked to http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname claim type, as it should
Fixed: better use of WIF namespaces in code: use System.Security.Claims as primary namespace for WIF

Changes in version 1.2.0.1 (published 25/01/2013)
Fixed: Removed an unnecessary check in the constructor that prevented LDAPCP to be called in some processes like OWSTimer or PowerShell, and could prevent to perform some operation.

Changes in version 1.2.0.0 (published 25/01/2013)
New: Added a new option to not resolve disabled users (works for AD only)
Fixed: Incorrect claim type used if incoming and local claim type are different (with New-SPClaimTypeMapping cmdlet)

Changes in version 1.1.0.0 (published 20/01/2013)
- Fixed: error "the user doesn't exist or is not unique" when web application has multiple zones and default zone does not use a TrustedLoginProvider

RTM version for SharePoint 2013 (published 02/12/2012)
It is largely based on LDAPCP 2010 v3.0.0.0, but with improvements and bug fixes:
- Improved: identity claim can now use any LDAP attribute as preferred display value.
- Fixed: Did not search on additional attributes outside of the people picker control.
- Changed: Description text does not display claim provider name anymore for better readability
- Changed 2 claim types:
"http://schemas.xmlsoap.org/claims/Group" becomes "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" because it doesn’t exist anymore in .NET 4.5
"http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname" becomes "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" because SharePoint throws an error message when it is used in a SAML token.

Released: LDAPCP v3.9 (Nov 05, 2015)

$
0
0
Changes in version 3.9 (published 05/11/2015)
- Fixed NullReferenceException bug that occurred with specific LDAP servers like Tivoli
- LDAPCP can now dynamically append FQDN to LDAP results when it creates permission, using token {fqdn}
- Minor improvements

Changes in version 3.8 (published 09/09/2015)
- An attempt to get LDAP object is now performed even if input was potentially submitted with a keyword that bypasses LDAP lookup
- Fixed a bug where LDAPCP may display permissions in web apps where it is not used

Changes in version 3.7 (published 11/02/2015)
- Implemented SupportsUserKey to support rehydration for provider hosted apps
- Updated logging

Changes in version 3.6 (published 14/01/2015)
- Fixed incorrect test on metadata field while creating item in claims table page
Validated new features added by itsystemsGuy:
- Added in the functionality to search by group attributes (i.e displayName).
- Added in timeout logic so LDAP queries will only run for a certain period of time before failing. The default is 10 seconds for new deployments and can be set in LDAPCP config page.
- Added in logic so that a domain token can be used as a prefix which will then replace {domain} with the relevant domain associated to the search result.

Changes in version 3.4 (published 06/11/2014)
- Improvements in claims table page
- Fixed bug in text description
- Now permission metadata can be set on any SPClaimEntityTypes (not only User)

Changes in version 3.3 (published 12/08/2014)
- Fixed incorrect value of parameter isIdentityClaimType in overridable method FormatPermissionValue
- Fixed permission validation issue when AlwaysResolveUserInput is set to true. Now, if this property is set to true, LDAP lookup is completely bypassed

Changes in version 3.2 (published 18/07/2014)
Added 2 overridable methods to allow customization of value and display text of permissions. This makes some customization a lot easier (see class LDAPCP_CustomResolution in LDAPCP for Developers for more details)

Changes in version 3.1 (published 11/07/2014)
Connection to LDAP servers is now multi-threaded (using Parallel Library only available in .NET 4+)

Changes in version 3.0 (published 08/07/2014)
Rewrote important parts of the code to be smarter, faster and more reliable.
Include various bug fixes
This is also the last version sharing the same code than LDAPCP 2010

Changes in version 2.2 (published 05/06/2014)
Fixed a minor bug that prevented LDAPCP to return results from central administration in rare scenarios

Changes in version 2.1 (published 05/06/2014)
Updated LDAPCP administration pages to:
- Connect to multiple LDAP / AD
- Set a keyword to resolve an input without LDAP lookup
- Set a prefix to add to a value returned by LDAP
And other minor improvements

Changes in version 2.0 (published 15/05/2014)
Fixed bug with multithreading: Results collections used by LDAPCP were shared by every thread. As a result, in very rare cases (issues were reported only with Project when it synchronized permissions between PWA and projects sites), and sometimes (< 1%) permission was created with values of another user.
Full integration of LDAPCP logging with SharePoint logging infrastructure
Improved admin "claims table" page with new options and improved layout

Changes in version 1.11 (published 22/04/2014)
New option to filter exact match only
New option to specify a custom LDAP filter individually for each LDAP attribute
Minor optimizations
Added new options in LDAPCP admin pages
Now by default computer accounts are excluded from results list

Changes in version 1.10 (published 27/03/2014)
Improved logging with a dedicated Area (LDAPCP) and a dedicated event id (1337)
Fixed memory leak issue
Some optimizations to improve performance
Better management of permissions metadata

Changes in version 1.9 (published 12/11/2013)
Minor optimizations in the code
Removed messages related to metadata of permission from ULS logging, which tended to flood the logs
added parameters "context" and "entityTypes" in method SetLDAPConnections to cover new scenarios for developers

Changes in version 1.8.0.0 (published 23/09/2013)
Many changes on the code to improve resilience and better support customizations of developers (especially when connecting to multiple LDAP servers)
added new property "LDAPAttributeToDisplay" to customize display text of each claim type
updated general admin page
added new LDAP attribute "sn" to search users with their last name
improved logging
minor bug fixes

Changes in version 1.7.0.0 (published 13/05/2013)
Added a new administration page to customize claims list
Fixed: minor bug that could occur with attributes set to be resolved as identity claim

Changes in version 1.6.0.0 (published 17/04/2013)
Fixed: bug when creating a SPClaimTypeMapping with a LocalClaimType different than IncomingClaimType

Changes in version 1.5.0.0 (published 28/03/2013)
New: Added ability to connect to LDAP in ServerBind authentication mode
New: Added option to exclude AD distribution lists from LDAP lookup

Changes in version 1.4.0.0 (published 21/03/2013)
Improved: Dramatic performance improvement of LDAP lookup by not using wildcard in front of search terms by default, which allows LDAP to use its indexes to speed up the lookup
New: Added option to choose to add or not a wildcard in front of search terms by default
New: Searches additional attributes to populate metadata of permission created (title, phone and SIP address)

Changes in version 1.3.0.0 (published 19/02/2013)
Fixed: sAMAccountName LDAP attribute is linked to http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname claim type, as it should
Fixed: better use of WIF namespaces in code: use System.Security.Claims as primary namespace for WIF

Changes in version 1.2.0.1 (published 25/01/2013)
Fixed: Removed an unnecessary check in the constructor that prevented LDAPCP to be called in some processes like OWSTimer or PowerShell, and could prevent to perform some operation.

Changes in version 1.2.0.0 (published 25/01/2013)
New: Added a new option to not resolve disabled users (works for AD only)
Fixed: Incorrect claim type used if incoming and local claim type are different (with New-SPClaimTypeMapping cmdlet)

Changes in version 1.1.0.0 (published 20/01/2013)
- Fixed: error "the user doesn't exist or is not unique" when web application has multiple zones and default zone does not use a TrustedLoginProvider

RTM version for SharePoint 2013 (published 02/12/2012)
It is largely based on LDAPCP 2010 v3.0.0.0, but with improvements and bug fixes:
- Improved: identity claim can now use any LDAP attribute as preferred display value.
- Fixed: Did not search on additional attributes outside of the people picker control.
- Changed: Description text does not display claim provider name anymore for better readability
- Changed 2 claim types:
"http://schemas.xmlsoap.org/claims/Group" becomes "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" because it doesn’t exist anymore in .NET 4.5
"http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname" becomes "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" because SharePoint throws an error message when it is used in a SAML token.

Updated Release: LDAPCP v3.9 (nov. 05, 2015)

$
0
0
Changes in version 3.9 (published 05/11/2015)
- Fixed NullReferenceException bug that occurred with specific LDAP servers like Tivoli
- LDAPCP can now dynamically append FQDN to LDAP results when it creates permission, using token {fqdn}
- Minor improvements

Changes in version 3.8 (published 09/09/2015)
- An attempt to get LDAP object is now performed even if input was potentially submitted with a keyword that bypasses LDAP lookup
- Fixed a bug where LDAPCP may display permissions in web apps where it is not used

Changes in version 3.7 (published 11/02/2015)
- Implemented SupportsUserKey to support rehydration for provider hosted apps
- Updated logging

Changes in version 3.6 (published 14/01/2015)
- Fixed incorrect test on metadata field while creating item in claims table page
Validated new features added by itsystemsGuy:
- Added in the functionality to search by group attributes (i.e displayName).
- Added in timeout logic so LDAP queries will only run for a certain period of time before failing. The default is 10 seconds for new deployments and can be set in LDAPCP config page.
- Added in logic so that a domain token can be used as a prefix which will then replace {domain} with the relevant domain associated to the search result.

Changes in version 3.4 (published 06/11/2014)
- Improvements in claims table page
- Fixed bug in text description
- Now permission metadata can be set on any SPClaimEntityTypes (not only User)

Changes in version 3.3 (published 12/08/2014)
- Fixed incorrect value of parameter isIdentityClaimType in overridable method FormatPermissionValue
- Fixed permission validation issue when AlwaysResolveUserInput is set to true. Now, if this property is set to true, LDAP lookup is completely bypassed

Changes in version 3.2 (published 18/07/2014)
Added 2 overridable methods to allow customization of value and display text of permissions. This makes some customization a lot easier (see class LDAPCP_CustomResolution in LDAPCP for Developers for more details)

Changes in version 3.1 (published 11/07/2014)
Connection to LDAP servers is now multi-threaded (using Parallel Library only available in .NET 4+)

Changes in version 3.0 (published 08/07/2014)
Rewrote important parts of the code to be smarter, faster and more reliable.
Include various bug fixes
This is also the last version sharing the same code than LDAPCP 2010

Changes in version 2.2 (published 05/06/2014)
Fixed a minor bug that prevented LDAPCP to return results from central administration in rare scenarios

Changes in version 2.1 (published 05/06/2014)
Updated LDAPCP administration pages to:
- Connect to multiple LDAP / AD
- Set a keyword to resolve an input without LDAP lookup
- Set a prefix to add to a value returned by LDAP
And other minor improvements

Changes in version 2.0 (published 15/05/2014)
Fixed bug with multithreading: Results collections used by LDAPCP were shared by every thread. As a result, in very rare cases (issues were reported only with Project when it synchronized permissions between PWA and projects sites), and sometimes (< 1%) permission was created with values of another user.
Full integration of LDAPCP logging with SharePoint logging infrastructure
Improved admin "claims table" page with new options and improved layout

Changes in version 1.11 (published 22/04/2014)
New option to filter exact match only
New option to specify a custom LDAP filter individually for each LDAP attribute
Minor optimizations
Added new options in LDAPCP admin pages
Now by default computer accounts are excluded from results list

Changes in version 1.10 (published 27/03/2014)
Improved logging with a dedicated Area (LDAPCP) and a dedicated event id (1337)
Fixed memory leak issue
Some optimizations to improve performance
Better management of permissions metadata

Changes in version 1.9 (published 12/11/2013)
Minor optimizations in the code
Removed messages related to metadata of permission from ULS logging, which tended to flood the logs
added parameters "context" and "entityTypes" in method SetLDAPConnections to cover new scenarios for developers

Changes in version 1.8.0.0 (published 23/09/2013)
Many changes on the code to improve resilience and better support customizations of developers (especially when connecting to multiple LDAP servers)
added new property "LDAPAttributeToDisplay" to customize display text of each claim type
updated general admin page
added new LDAP attribute "sn" to search users with their last name
improved logging
minor bug fixes

Changes in version 1.7.0.0 (published 13/05/2013)
Added a new administration page to customize claims list
Fixed: minor bug that could occur with attributes set to be resolved as identity claim

Changes in version 1.6.0.0 (published 17/04/2013)
Fixed: bug when creating a SPClaimTypeMapping with a LocalClaimType different than IncomingClaimType

Changes in version 1.5.0.0 (published 28/03/2013)
New: Added ability to connect to LDAP in ServerBind authentication mode
New: Added option to exclude AD distribution lists from LDAP lookup

Changes in version 1.4.0.0 (published 21/03/2013)
Improved: Dramatic performance improvement of LDAP lookup by not using wildcard in front of search terms by default, which allows LDAP to use its indexes to speed up the lookup
New: Added option to choose to add or not a wildcard in front of search terms by default
New: Searches additional attributes to populate metadata of permission created (title, phone and SIP address)

Changes in version 1.3.0.0 (published 19/02/2013)
Fixed: sAMAccountName LDAP attribute is linked to http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname claim type, as it should
Fixed: better use of WIF namespaces in code: use System.Security.Claims as primary namespace for WIF

Changes in version 1.2.0.1 (published 25/01/2013)
Fixed: Removed an unnecessary check in the constructor that prevented LDAPCP to be called in some processes like OWSTimer or PowerShell, and could prevent to perform some operation.

Changes in version 1.2.0.0 (published 25/01/2013)
New: Added a new option to not resolve disabled users (works for AD only)
Fixed: Incorrect claim type used if incoming and local claim type are different (with New-SPClaimTypeMapping cmdlet)

Changes in version 1.1.0.0 (published 20/01/2013)
- Fixed: error "the user doesn't exist or is not unique" when web application has multiple zones and default zone does not use a TrustedLoginProvider

RTM version for SharePoint 2013 (published 02/12/2012)
It is largely based on LDAPCP 2010 v3.0.0.0, but with improvements and bug fixes:
- Improved: identity claim can now use any LDAP attribute as preferred display value.
- Fixed: Did not search on additional attributes outside of the people picker control.
- Changed: Description text does not display claim provider name anymore for better readability
- Changed 2 claim types:
"http://schemas.xmlsoap.org/claims/Group" becomes "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" because it doesn’t exist anymore in .NET 4.5
"http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname" becomes "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" because SharePoint throws an error message when it is used in a SAML token.

New Post: Creating user profiles without resolution?

$
0
0
Hello Ivan,

We want to share documents with azure users.
Currently they can access the platform (auth) via ADFS without problems, but we’d like to programmatically create user profiles for them (to assign them properties)

Problem, when we try ensureuser()… createProfile(), we have a “user not found” problem, which is logical, because they do not yet exist, and you can’t LDAP query azure.
(well, perhaps you can now with azure DS preview, but atm I assume you can’t)

Any idea about a solution for what we’d like to do?
Do you have to install BOTH azurecp and ldapcp, or can you just bypass name resolution for those external users, as we'll never directly auth or name resolve with Azure?

hope i'm clear ;)

Basically we'd like to share documents with external users, and we want to create an azure account for them and link it to a sharepoint account. Azure users can auth via ADFS and sharepoint then create them a profile, can't see why we can't do this by code.

Anyway, ensureUser() gives not found. Manually trying to create the profile also fails. Any idea?

thanks!

New Post: Creating user profiles without resolution?

$
0
0
to reply to my own question :)
there are two methods in the people picker, one that fills a list, and one that resolves a user.
Only a resolved user can be given permissions by the "share" button.

So you either provide a name resolution method, or bypass it to create your external user, as long as the identifier is matched with the one provided by your auth, it'll work.

For the record, if you where to implement people search on both ADFS and Azure, i expect you'd have to code some search logic in the fill method, using LDAP for AD into ADFS users, and the graph API ($filter startswith...) for the Azure into ADFS users. Tricky.
Viewing all 270 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>