Re: Reducing ADAM Accesses



Hi Joe, thanks for this suggestion. I have looked at some documentation on
MSDN but I can't find anything obvious that seems to cover reducing traffic.
Was there anything in particular that you had in mind?

"Joe Kaplan" wrote:

Have you looked at the ADAM tokenGroups attribute on RootDSE?

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Phran" <Phran@xxxxxxxxxxxxxxx> wrote in message
news:E517F220-2215-4955-8B49-FE6E89F8ED99@xxxxxxxxxxxxxxxx
Hello, I have a question about reducing the number of trips to query group
membership held in and ADAM.

Below is some code that I have butchered from a sample to keep things
simple. The code is intended to bind to a user object and then to iterate
over the group memberships of that user - in order to find out whether the
user is a member of a group. If I was to call this code repeatedly for the
same user it seems to me that there would be repeated binds to the ADAM
followed by repeated iterations of over the group membership.

What suggestions do people have about reducing the number of trips to the
ADAM?


ADsOpenObject(..., (void **)&pIADsUser);

IADsMembers *pIADsMembers;
pIADsUser->Groups(&pIADsMembers)));

pIADsMembers->get__NewEnum(&pUnk);
hr = pUnk->QueryInterface(IID_IEnumVARIANT,(void**)&pEnum);

while (SUCCEEDED(hr) && hr != S_FALSE)
{
hr = pEnum->Next(1, &Variant, &ulElementsFetched)));

// hr = false if there is no next
if (hr != S_FALSE)
{
IDispatch *pDispatch = NULL;
IADsGroup *pIADsGroup = NULL;
hr = pDispatch->QueryInterface(IID_IADsGroup,(VOID **) &pIADsGroup))) ;

pIADsGroup->get_ADsPath(&groupNameBstr);

}

}



.



Relevant Pages

  • Re: Reducing ADAM Accesses
    ... Thanks for this Joe, caching is of course an excellent solution. ... really has nothing to do with ADAM or whatever your backend store is. ... over the group memberships of that user - in order to find out whether the ...
    (microsoft.public.windows.server.active_directory)
  • Re: ADMT 2.0 Errors???
    ... Joe thanks for your reply but what do you suggest I do??? ... > will update the group memberships during the user migration. ...
    (microsoft.public.win2000.active_directory)
  • Re: ADMT 2.0 Errors???
    ... Joe thanks for your reply but what do you suggest I do??? ... > will update the group memberships during the user migration. ...
    (microsoft.public.windows.server.active_directory)
  • Re: ADMT 2.0 Errors???
    ... Joe thanks for your reply but what do you suggest I do??? ... > will update the group memberships during the user migration. ...
    (microsoft.public.windows.server.migration)
  • Re: AD to ADAM: Constraint Violation
    ... I'm answering this for the unlucky person who Googles the groups and gets ... and not to where Joe did a great job of answering this elsewhere. ... So, if you are importing users, groups and group memberships, ... For creating user objects you only need the DN, objectClass, ...
    (microsoft.public.windows.server.active_directory)

Loading