Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将用户添加到SharePoint的Webservice(如SPWeb.reuser)_Sharepoint_Sharepoint 2010 - Fatal编程技术网

将用户添加到SharePoint的Webservice(如SPWeb.reuser)

将用户添加到SharePoint的Webservice(如SPWeb.reuser),sharepoint,sharepoint-2010,Sharepoint,Sharepoint 2010,我需要通过Web服务将用户添加到SharePoint网站(WSS 3.0) 使用API,我会使用该方法,但我无法在服务器上运行自己的代码。 我希望这个方法能有所帮助,但它并没有提供一个合适的方法 那么,是否存在与SPWeb.reuser等效的Web服务 我昨天偶然发现了这个问题。事实上,有一个Web服务等价于Web.reuser,但它不在用户组中。改为使用人员web服务(_vti_bin/People.asmx)的resolvePrinciples方法 关键是输入true以获取addToUse

我需要通过Web服务将用户添加到SharePoint网站(WSS 3.0)

使用API,我会使用该方法,但我无法在服务器上运行自己的代码。
我希望这个方法能有所帮助,但它并没有提供一个合适的方法


那么,是否存在与SPWeb.reuser等效的Web服务

我昨天偶然发现了这个问题。事实上,有一个Web服务等价于
Web.reuser
,但它不在用户组中。改为使用人员web服务(_vti_bin/People.asmx)的
resolvePrinciples
方法

关键是输入
true
以获取
addToUserInfoList
的值。服务调用返回的
PrincipalInfo
对象包含一个
UserInfoID
,您可以在该站点上与成员资格相关的其他操作中使用它

下面是一个使用PowerShell 2.0中web服务的示例:

$client = new-webserviceproxy http://mysharepointsite/_vti_bin/people.asmx?wsdl -usedefault
$person = $client.ResolvePrincipals(@('domain\user'), 'User', $true)
# ...
您还可以使用来标识主体是否已添加到网站集。如果主体已添加到网站集用户,则选中将返回值>-1。