Coder Social home page Coder Social logo

Comments (8)

Yvand avatar Yvand commented on August 10, 2024

@unh1990, can you confirm you are able to connect to your LDAP from the SharePoint server using the script below:

$filter = "(&(objectClass=user)(|(sAMAccountName=yvand*)(cn=yvand*)))"
$ldapServer = "contoso.local"
$ldapBase = "DC=contoso,DC=local"
$ldapUser = "contoso\spfarm"
$ldapPassword = Read-Host "Enter the password (will appear in clear text)"
$ldapAuth = [System.DirectoryServices.AuthenticationTypes] "Secure, Signing"

$directoryEntry = New-Object System.DirectoryServices.DirectoryEntry("LDAP://$ldapServer/$ldapBase" , $ldapUser, $ldapPassword, $ldapAuth)
$objSearcher = New-Object System.DirectoryServices.DirectorySearcher ($directoryEntry, $filter)
# Uncomment line below to restrict properties returned by LDAP server
#$objSearcher.PropertiesToLoad.AddRange(@("cn"))

$results = $objSearcher.FindAll() 
Write-Host "Found $($results.Count) result(s)":
foreach ($objResult in $results)    {$objItem = $objResult.Properties; $objItem}

If this script works, LDAPCP should work too

from ldapcp.

unh1990 avatar unh1990 commented on August 10, 2024

I tried the script but get this message from the server that is trying to connect to the LDAP server:
Exception calling "FindAll" with "0" argument(s): "The server is not operational.
"
At line:13 char:1

  • $results = $objSearcher.FindAll()
  •   + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
      + FullyQualifiedErrorId : COMException
    

Found 0 result(s)

from ldapcp.

unh1990 avatar unh1990 commented on August 10, 2024

I am able to connect to the LDAP server using Softera LDAP Browser but not through the config settings for LDAPCP.

from ldapcp.

Yvand avatar Yvand commented on August 10, 2024

@unh1990 there must be a setting in the script that prevents the LDAP connection, while it works with your LDAP browser.
It could be an AuthenticationTypes option, or maybe something else, but I cannot help you much more since it totally depends on your environment

from ldapcp.

unh1990 avatar unh1990 commented on August 10, 2024

I added an entry for the ip of the ldap server and now if I choose none for the authentication type it shows connected successfully however I get an error stating validation failed and cannot be resolved when clicking share on the people picker in a web app that is using the custom provider. The logs show a connection is made and a result is returned but I cannot get SharePoint to resolve the user i:05.t|xxxxx|firstname.lastname. Any suggestions on what needs to be done to get the people picker to work?

from ldapcp.

Yvand avatar Yvand commented on August 10, 2024

@unh1990 without the logs it is difficult to comment. Does LDAPCP write that validation was successful?

from ldapcp.

unh1990 avatar unh1990 commented on August 10, 2024

I was able to get the connection to our LDAP server working correctly but it does not allow me to find saml users when working in Central admin (site collection administration, web app access...) I read in a Microsoft article that states that People picker in CA will return users, groups, claims by default. I get the following error in the SharePoint ULS Logs.
https://learn.microsoft.com/en-us/sharepoint/administration/people-picker-and-claims-providers-overview

This is the error message captured in the ULS Logs
[LDAPCPSE] A DirectoryServicesCOMException occured while connecting using the default AD connection. It may be resolved by replacing it with a custom LDAP connection with explicit credentials. ------------- comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v4563"

Any suggestions?

from ldapcp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.