Open mnavidad opened 6 years ago
Seeing the same thing.
Looks like this has been sitting for a while, any ideas?
I have the same problem. profile is null
I had the same issue and I found that it was because the default ldap query was not correct for our ldap configuration.
However, The strategy accepts a search_query
argument (although this does not seem to be documented anywhere):
The passport-windowsauth LdapLookup.js shows the following:
this._search_query = options.search_query || '(&(objectclass=user)(|(sAMAccountName={0})(UserPrincipalName={0})))';
To get the strategy to work with our ldap I had to modify the query to search for "cn" instead of "UserPrincipalName". This is how you pass in the argument:
var passport = require("passport");
var WindowsStrategy = require("passport-windowsauth");
// ...
// Init passport strategy
passport.use(new WindowsStrategy({
ldap: {
url: ldapUrl,
base: ldapBase,
bindDN: ldapBindUN,
bindCredentials: ldapBindPW,
search_query: "(&(objectclass=user)(|(sAMAccountName={0})(cn={0})))"
},
integrated: false
}
thank you!
Hi We have a node js application using passport-windowsauth for ldap, the code is set up to also use a form. here is the code
js code
when we run the application the profile is null and I do not know why, the application is running on express server however we use IIS as a passthrough using ARR. I'm looking to see if someone can shed a light to this issue or point me in the right direction to see why this is not working
Thank you so much!