locked
C# AD SearchResponse does not contain memberOf when using DirSyncRequestControl RRS feed

  • Question

  • C#

    using System.DirectoryServices.Protocols;<o:p></o:p>

    I am failing to retrieve the group membership of all AD users when I use a DirSyncRequestControl (with or without cookie, null or previously stored).

    The group membership is returned fine when I DON'T add the DirSyncRequestControl to the search request.

    string[] attribs = new string[4];

    attribs[0] = "SAMAccountName";

    attribs[1] = "name";

    attribs[2] = "memberOf";

    attribs[3] = "description";

    SearchRequest request = new SearchRequest(string.Format("DC=my,DC=domain"), "(objectcategory=person)", SearchScope.Subtree, attribs);

    Searching the internet reveals little on this subject.

    Is the memberOf attribute not replicated when using DirSync?

    Is it a permission thing? I am Domain Admin for the target domain.

    Any help appreciated.

    Thursday, March 27, 2014 6:43 AM

Answers

  • Hi Pgtnz,

    I cannot find MemberOf attribute, but find Member attribute, you can refer to the following link for details. http://support.microsoft.com/kb/2256198. Please check maybe you have some mistake.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, April 3, 2014 9:18 AM

All replies

  • Hi Pgtnz,

    There is no document says that DirSyncRequestCOntrol doesn’t support Memberof attribute. See for details. http://msdn.microsoft.com/en-us/library/windows/desktop/ms677626(v=vs.85).aspx.

    https://www.unboundid.com/products/ldap-sdk/docs/javadoc/com/unboundid/ldap/sdk/experimental/ActiveDirectoryDirSyncControl.html.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, March 28, 2014 6:20 AM
  • Hi Herro,

    Unfortunately there is also no document that explicitly says that it does. My code (very simply) does not return the memberOf attribute when using the dirsync control.

    I would be happy to have assurance that it DOES support memberOf, and then hope that there will be documentation or help somewhere that could explain why it is the only attribute not returned when using the dirsync control.

    Cheers

    Peter

    Sunday, March 30, 2014 9:18 PM
  • Hi Pgtnz,

    I cannot find MemberOf attribute, but find Member attribute, you can refer to the following link for details. http://support.microsoft.com/kb/2256198. Please check maybe you have some mistake.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, April 3, 2014 9:18 AM