Re: Reducing ADAM Accesses



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: Client Certificate Authentication with ADAM
    ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... can't do this with ADAM users. ...
    (microsoft.public.windows.server.active_directory)
  • Re: ADAM and accessing it like Active Directory
    ... I'd recommend using the AD membership provider with ADAM, ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.windows.server.active_directory)
  • Re: ADAM schema modifications to make common name a multivalued attrib
    ... My understanding is that you can't do this with ADAM. ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... I am looking for help to make common name permit vultivalued entries. ...
    (microsoft.public.windows.server.active_directory)
  • Re: cant connect to ADAM instance with System.DirectoryServices
    ... You get a weird and unhelpful error when it is ... can only get to using the lower level API though (such as ADAM digest auth). ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.windows.server.active_directory)
  • Re: Binding to ADAM with a Windows Account
    ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... To bind with a Windows account to ADAM, ...
    (microsoft.public.windows.server.active_directory)