question

BhujbalShreyas-9202 avatar image
0 Votes"
BhujbalShreyas-9202 asked LimitlessTechnology-0326 answered

GroupPrincipal GetMembers() fails

I am using GroupPrincipal.GetMembers(true) for getting all group members.
It gives Exception " Unhandled exception. System.DirectoryServices.AccountManagement.PrincipalOperationException: This operation returned because the timeout period expired."

please help

windows-active-directory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LimitlessTechnology-0326 avatar image
0 Votes"
LimitlessTechnology-0326 answered

Hello

Thank you for your question and reaching out. I can understand you are having issues related to GroupPrincipal.GetMembers fails due to time out.


I believe this can happens because of the 2 Minute Timeout of the Filter and the big amount of data the query should return.


Timeout Behavior : The following statements specify timeout conditions within the Active
Directory module and describe what can be done about a timeout them.

 The default Active Directory module timeout for all operations is 2    minutes.

Reference :
https://docs.microsoft.com/en-us/previous-versions/windows/server/hh531527(v=ws.10)?redirectedfrom=MSDN



--If the reply is helpful, please Upvote and Accept as answer--

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.