SharePoint2007Provider::GetGroupsFromUser
This procedure returns information about the collection of groups of which the specified user is a member.
Arguments
Input Arguments | Required | Description |
---|---|---|
<target> |
Yes |
The URL of the Windows SharePoint Services administration site. |
<siteGUID> |
Yes |
The globally unique identifier (GUID) of the Windows SharePoint Services site collection. |
<subSiteGUID> |
Yes |
The GUID of the sub site. |
<userLoginName> |
Yes |
A string that contains the user name (DOMAIN\User_Alias) of the user. |
Output Arguments | Description |
---|---|
<group/@id> |
The member ID for the group. |
<group/@name> |
The name of the group. |
<group/@description> |
The description for the group. |
<group/@ownerId> |
The owner for the group, which can be a user or another group. |
<user/@id> |
The member ID for the user. |
<user/@sid> |
The unique security ID for the network account of the user. |
<user/@name> |
The display name of the user. |
<user/@loginName> |
The login name of the user. |
<user/@email> |
The e-mail address of the user. |
<user/@notes> |
The notes for the user. |
<user/@isSiteAdmin> |
A Boolean value that specifies whether the user is a site collection administrator. |
<user/@isDomainGroup> |
A Boolean value that indicates whether the user is a domain group. |
Remarks
This procedure does not need rollback.
Sample Code
Example XML Request
<request>
<data>
<target>https://spserver:8181</target>
<siteGUID>3F2504E0-4F89-11D3-9A0C-0305E82C3301</userDN>
<subSiteGUID>3F2504E0-4F89-11D3-9A0C-0305E82C4284</subSiteGUID>
<userLoginName>fabrikam\administrator</userLoginName>
</data>
<procedure>
<execute namespace="Sharepoint2007Provider" procedure="GetGroupsFromUser" impersonate="1" >
<before source="data" destination="executeData" mode="merge"/>
<after source="executeData" destination="data" mode="merge"/>
</execute>
</procedure>
</request>
Example XML Response
<response>
<data>
<groups>
<group id="3" name="SPNSTestGroup" description="Add Group Test." ownerId="1">
<users>
<user id="3"
sid="S-1-5-21-3511655109-3096873398-1435752672-500"
name="Administrator"
loginName="FABRIKAM\administrator"
email=""
notes=""
isSiteAdmin="false"
isDomainGroup="false"/>
<user id="1"
sid="S-1-5-21-1630865545-1885683816-3691740238-500"
name="WSSFE\administrator"
loginName="WSSFE\administrator"
email="admin@somecompany.com"
notes=""
isSiteAdmin="true"
isDomainGroup="false"/>
</users>
</group>
</groups>
</data>
</response>
Applies To
Hosted Messaging and Collaboration version 4.5
Hosted Messaging and Collaboration version 4.0
See also
Tasks
SharePoint2007Provider::AddUsersToGroup
SharePoint2007Provider::RemoveUsersFromGroup