Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search generating exception [Active Directory Recycle Bin] [DirectoryEntry] #10514

Open
RikeGC opened this issue Oct 8, 2024 · 2 comments
Open
Assignees
Labels
area-System.DirectoryServices Pri3 Indicates issues/PRs that are low priority

Comments

@RikeGC
Copy link

RikeGC commented Oct 8, 2024

Type of issue

Missing information

Description

Hello everyone.

I'm trying to retrieve information about deleted objects in Active Directory. Typically, these objects are stored in the Active Directory recycle bin. I can perform searches using the DirectorySearcher class, but when I attempt to query the DirectoryEntry class using the same path from DirectorySearcher, I encounter exceptions for all fields.

String myADSPath = "LDAP:///CN=\0ADEL:,CN=Deleted Objects,DC=adomain,DC=br";

DirectoryEntry myDirectoryEntry = new DirectoryEntry(myADSPath, username, password);

string teste = myDirectoryEntry.Parent.Path;

imagem (40)

I can run the same query without any issues when it involves an active object. However, I'm encountering problems specifically with deleted objects. I would like to know if there are any alternative methods to investigate this issue. It's possible that there are permissions I might not have.

I tried to retrieve information about deleted objects in Active Directory using the DirectorySearcher class. My expectation was to successfully query the deleted objects stored in the Active Directory recycle bin, which would help me develop a restoration plan for these objects. However, when I attempted to use the same path from DirectorySearcher to query the DirectoryEntry class, I encountered exceptions for all fields.

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.directoryentry.parent?view=net-8.0#system-directoryservices-directoryentry-parent

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.DirectoryServices/DirectoryEntry.xml

Document Version Independent Id

a0633bd1-abe0-958f-d0ed-966c01b7942c

Article author

@dotnet-bot

@issues-automation issues-automation bot added the Pri3 Indicates issues/PRs that are low priority label Oct 8, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Oct 8, 2024
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 8, 2024
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@steveharter steveharter self-assigned this Oct 8, 2024
@steveharter steveharter removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners untriaged New issue has not been triaged by the area owner labels Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.DirectoryServices Pri3 Indicates issues/PRs that are low priority
Projects
None yet
Development

No branches or pull requests

2 participants