Get "isLocked" with LDAP_Extension

Get "isLocked" with LDAP_Extension

  
Good morning people! Anyone know how can i get the field isLocked with the LDAP_Extension? It is always giving me the same result (always false). Do i have to do some changes to the extension?

Thanks.

Best regards,
Diogo Pacheco
Good afternoon! Add-on to this topic... how can i get an extensionAttribute using LDAP_Extension!?

Thanks.

Best regards,
Diogo Pacheco
Hello Diogo,

Can you give us more information about your issue?
First of all what is the platform version you are working on? Which extension are you using (modified by you or not)?
What is the task that you want to do?

Best Regards,
Gonçalo M.
Hello Gonçalo! I'm working with the 6.0.1.16 platform version. I was working with the LDAP Extension with no modified code but today i've made some changes. I've already solved the first issue with the property LockoutTime instead of the one that was defined and it's working. But now i need to get an extensionAttribute and i don't really know how to do this.

Best regards,
Diogo Pacheco
Hi Diogo,

Which .net framework version are you using? What is the extensionAttribute that you want to get?
One approach is querying Microsoft Active Directory Using Microsoft .NET Framework Library (using System.DirectoryServices).
The property values in a collection are read using the Value property from the PropertyValueCollection object. If there is only one value in the collection, it is returned as an object representation of the value.
To access an object property value, provide the name of the property using the syntax shown in the following code example:

DirectoryEntry.Properties["givenName"].Value;  // "givenName" is the property you want to search for

An example to get the property "sn" using this:

DirectoryEntry ent = new DirectoryEntry("LDAP://Fabrikam/CN=My Username,CN=Users,DC=Fabrikam,DC=com");
string name = ent.Properties["sn"].Value.ToString();
Console.WriteLine(name);

But I would need more information to try to help you better, since you modified the extension.
Send me an email if you need any help.

Best Regards,
Gonçalo M.