locked
how to retrieve user groups in sharepoint using service RRS feed

  • Question

  • Hi,

    Could anyone help how to retrieve sharepoint groups for specific user using sharepoint service.

    Thank you

    Monday, December 9, 2013 2:03 PM

Answers

  • Following example shows how to consume usergroup service using WCF


    UserGroup ugService = new WebReference.UserGroup();

    ugService.Credentials =new NetworkCredential(ConfigurationManager.AppSettings["UserName"], ConfigurationManager.AppSettings["Password"], ConfigurationManager.AppSettings["Domain"]);

    ugService.Url = retGrpDataBO.siteCollection+"/_vti_bin/UserGroup.asmx";

    XmlNode ndUser = ugService.GetGroupCollectionFromUser(retGrpDataBO.userId);

    • Marked as answer by DThriveni Thursday, December 12, 2013 7:11 AM
    Thursday, December 12, 2013 7:11 AM

All replies