locked
How to get URL for the group using webservices? RRS feed

  • Question

  • Hi

    How to get the URL of the Group (Like Home members,Home visitors,Home owners) using web services.

     

    Wednesday, July 27, 2011 10:35 AM

Answers

  • You will have to make the url based on ID. Here you can not directly get the absolute or relative url of group because those page are application page not the site page.

    For example: Here is the absolute url of group

    http://servername:12000/_layouts/people.aspx?MembershipGroupId=3 //here 3 is the groupid

    now you have to pass the value like this:

    string url="http://servername:port/" + "+_layouts/people.aspx?MembershipGroupId=" + groupid

    I have not done this using web service but i have done using object model. But any way, i am sure you can get it here also. Please check the XMLNode if there is any ID column / value.

    See this link for more information about MembershipGroupId but this link for object model not for web service.

    http://www.novolocus.com/author/admin/page/7/

    Let us know if it works


    Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"
    Wednesday, July 27, 2011 1:39 PM

All replies

  • Hi,

    You can use UserGroup.asmx web service of sharepoint. Once you use this service then you will get all the user group form the site.

    Here is the sample code to use web service

    http://blogs.msdn.com/b/sowmyancs/archive/2008/09/10/some-cool-functionalities-of-usergroup-asmx-webservice.aspx

    Let us know if there is any problem

     


    Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"
    Wednesday, July 27, 2011 11:41 AM
  • Here we can able to get group id using GetGroupCollectionFromUser method,but we cant get complete URL.
    Wednesday, July 27, 2011 12:51 PM
  • You will have to make the url based on ID. Here you can not directly get the absolute or relative url of group because those page are application page not the site page.

    For example: Here is the absolute url of group

    http://servername:12000/_layouts/people.aspx?MembershipGroupId=3 //here 3 is the groupid

    now you have to pass the value like this:

    string url="http://servername:port/" + "+_layouts/people.aspx?MembershipGroupId=" + groupid

    I have not done this using web service but i have done using object model. But any way, i am sure you can get it here also. Please check the XMLNode if there is any ID column / value.

    See this link for more information about MembershipGroupId but this link for object model not for web service.

    http://www.novolocus.com/author/admin/page/7/

    Let us know if it works


    Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"
    Wednesday, July 27, 2011 1:39 PM