How to avoid AD property not found errors

How to avoid AD property not found errors

Post by Andres M. Hidalg » Sun, 23 Jun 2002 05:42:15



I'am trying to get the groups an user belongs yo AD with the following snip
of code and it works
from one machine but I get
Error: "The Active Directory property cannot be found in cache"
Code: 8000500D
Source: Active Directory

Function MemberGroups (oUsr)
 Dim s, oGroups

oGroups = oUsr.GetEx("memberOf")

for Each s in oGroups
    WScript.Echo s
Next

Is there a guaranteed way to always get this or other info without getting
this error?.

Andres

 
 
 

How to avoid AD property not found errors

Post by Weiqing T » Sun, 23 Jun 2002 10:00:57


When the property is not set and you try to call Get() or GetEx() on it, you
will surely receive this error. One possible way is to do something like the
following.

group = obj.memberof                                               instead
of             group = obj.Get("memberof")
wscript.echo obj.telephoneNumber                            instead of
wscript.echo obj.Get("telephoneNumber")

Also you always can use "On error resume next", and check error properly.

weiqing tu

This posting is provided "AS IS" with no warranties, and confers no rights.



Quote:> I'am trying to get the groups an user belongs yo AD with the following
snip
> of code and it works
> from one machine but I get
> Error: "The Active Directory property cannot be found in cache"
> Code: 8000500D
> Source: Active Directory

> Function MemberGroups (oUsr)
>  Dim s, oGroups

> oGroups = oUsr.GetEx("memberOf")

> for Each s in oGroups
>     WScript.Echo s
> Next

> Is there a guaranteed way to always get this or other info without getting
> this error?.

> Andres


 
 
 

1. ChangePassword method results in error "AD property not found in cache"

I am connecting to an LDAP service using ADSI.I am able to get search
results and read a few properties .However when i use the method
ChangePassword on a IADsUser interface i get an error saying "Active
directory property not found in cache.this error comes up for a few
properties not all,why is it so?

i was using netscape api's to access the directory previously and a
particular user's property were retrievable easily,its exactly for
these properties that ADSI doesn't give any error.

please tell me what the error means and how can i change a users
password or maybe my own.

moreover the changepassword method works fine when i connect to the
local NT domain.

thanks,
Amol Kakhandki

2. How to write a C API ?

3. page not found error doc not being found

4. TRS-80 Model IV CPM?

5. Package icon not found in hardware inventory properties

6. FS: IBM PCMCIA Audio Adapter (Soundcard)

7. 8000500d - The active Directory property can not be found in Cache

8. Fax software

9. Word Property Demotion Not Working if the property already has a value

10. Error with HTTP Advanced Properties: "Unable to display configuration properties"

11. Error 'Extension SMTP could not be loaded' when accessing IMC properties

12. Error in ASP.NET Application accessing AD, Server not operational.

13. Failed to find a domain controller - network path was not found