Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

How to Access users from Sharepoint group using sharepoint web service?

$
0
0

Hi All,

I have to get all sharepoint user from specific Group in my ASP.NET Web Service. For that, I am using sharepoint web service :

i.e.http://<Site>/_vti_bin/usergroup.asmx

My Code is as follows:

CMS_Group_Service.UserGroup lstSharePointGroups = new CMS_Group_Service.UserGroup();

System.Net.NetworkCredential credentialSharePointWebService = new System.Net.NetworkCredential("UserName", "Password");

lstSharePointGroups.Credentials = credentialSharePointWebService;

System.Xml.XmlNode ndGroups = lstSharePointGroups.GetUserCollectionFromGroup("Formatter");

But above code is giving me an error:

"The request failed with HTTP status 401: Unauthorized."

but if I use other methods like "GetGroupCollectionFromSite", its work fine with me. 

Please let me know. What I have to add to resolve this issue.



Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>