Click here to Skip to main content
15,029,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
PrincipalContext ctx = new PrincipalContext(ContextType.ApplicationDirectory, "", "ou=*Garden City Users, o=microsoft,c=us", ContextOptions.SecureSocketLayer | ContextOptions.SimpleBind, "CN=ppatel, OU=*Garden City Users, O=Microsoft, C=US ", "password");
           UserPrincipal up = UserPrincipal.FindByIdentity(ctx, IdentityType.Name,"ppatel");

           if (up != null)
               PrincipalSearchResult<Principal> Results = up.GetAuthorizationGroups();
               foreach (Principal Result in Results)

I am trying to get all the group to which user is associated. My code is above. when i am trying to run it i am getting error that LDAP SERVER IS UNAVAILABLE ....

Can anyone please help on this


1 solution


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900