none
DirectorySearch unable to find newly added groups RRS feed

  • Question

  • deSearch.Filter = ("(&(objectCategory=group)(objectClass=group)(samAccountName=Payment*))");

    Above is my filter that Im using for my DirectorySearch. I've added new groups in my Active Directory which have the prefix of 'Payment' but the search returns nothing.

    If I change samAccountName=Payment to samAccountName=Dns it returns the groups with the Dns prefix. If I remove the samAccountName filter it returns all groups but still not Payment groups.

    The only thing I feel is different about the Payment groups is that they are new so maybe havent been 'committed' to the AD. I've closed the AD and reopened but no success.

    Any information/help is appreciated.

    Wednesday, August 15, 2018 2:00 PM

All replies

  • Hi ChrisDeweyJamesSouthall,

    Thank you for posting here.

    For your question, could you make sure you have add this group in AD? How do add this group using C#?

    If the UsePropertyCache property is true and you want to commit cached changes, call the CommitChanges method. To update values in the cache after changes to the directory are made, call the RefreshCache method. Please check thst if you call RefreshCache before calling CommitChanges, any uncommitted changes to the property cache will be lost.

    If it is possible, please provide the code which you used to add group.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by Stanly Fan Wednesday, August 22, 2018 2:25 AM
    Thursday, August 16, 2018 8:46 AM
    Moderator