GroupPrincipal method FindByIdentity throw strange exception

前端 未结 2 1954
离开以前
离开以前 2021-01-14 07:28

I am trying to get all users by group name and dispalay it in sharepoint webpart. adGroupName something like = \"CompanyGroup\".

GroupPrincipal grp = GroupPr         


        
2条回答
  •  独厮守ぢ
    2021-01-14 08:07

    Do you use something like this to get your context ?

    /* Retreiving a principal context
    */
    PrincipalContext ctx = new PrincipalContext(ContextType.Domain, "MachineIP:389", "dc=dom,dc=fr", "jpb", "root.123");
    

    Where you can replace MachineIP by the DNS name of your domain or one of you DC.

提交回复
热议问题