Flexabust Bergson
Flexabust Bergson

Reputation: 762

What does GetObject() method return using LDAP?

I am working on an intranet website that was created using VBS and Active Directory, and I have to remake a new version using C#. I'm having trouble understanding a VB method : GetObject("LDAP://"+Groups).

Where Groups = userObject.memberOf

Groups are the groups a user belongs to. What would be the equivalent of this method in C#? And what exactly is being returned by this method?

What I have done so far is create a POCO called ADProperties which allows me to load user properties after searching a user. I have implemented authentication too, so I am using ClaimsIdentity to handle the user that's logged and have added Active Directory properties to those claims.

Thanks!

Upvotes: 0

Views: 1324

Answers (1)

naturalbornlazy
naturalbornlazy

Reputation: 301

According to https://msdn.microsoft.com/en-us/library/aa772325(v=vs.85).aspx, I would assume the method is used to get an array of the actual Group objects. You should be able to confirm this by checking what is further done with this object in your code.

There also doesn't seem to be an equivalent in C#, so you'll just have to figure out what this data is used for and find a different way to do it in c#. If you keep having trouble, post more of your code and where the problems arise.

Upvotes: 1

Related Questions