3
votes

I am using SharePoint Web Services Access to gather site level security users. SharePoint recognizes Active Directory Security Groups as users (not as groups). I gathered these pseudo-groups with a SOAP request (see below) utilizing SharePoint Web Services via http://{site}/_vti_bin/Lists.asmx:

$uri = $context
$soap = '<?xml version="1.0" encoding="utf-8"?>'
$soap+= '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'
$soap+= '<soap:Body>'
$soap+= '<GetUserCollectionFromWeb xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/" />'
$soap+= '</soap:Body>'
$soap+= '</soap:Envelope>'
[xml]$WF = Invoke-RestMethod $uri -Credential $CRED -Method POST -ContentType "text/xml" -Body $soap

$Users = $WF.Envelope.Body.GetUserCollectionFromWebResponse.GetUserCollectionFromWebResult.GetUserCollectionFromWeb.Users.User

The above request is successful at the site and subsite level. But is not successful at the library, lists and documents level.

Is there a resource via Web Services Access that mirrors GetUserCollectionFromWeb at the Library, List and Document level?

I'm beginning to rip my hair out trying to access this data.

Thanks.

1

1 Answers

0
votes

You would use the Permissions web service, accessible at /_vti_bin/Permissions.asmx.

You can refer to MSDN documentation on the Permissions service here.

The GetPermissionCollection method will give you an xml fragment with members (by ID number) and permission masks.

You can use the People web service (/_vti_bin/People.asmx) to associate member ID numbers with actual people and groups.