跳到主要内容
版本:v6.5.0

连接到SharePoint

命令说明

连接到SharePoint服务器

命令原型

spCtx = SharePoint.Connect(strURL ,strUserName ,strPassword ,strClientId, strClientSecret)

命令参数

参数必选类型默认值说明
strURLTruestring""SharePoint site地址
strUserNameTruestring""具有SharePoint权限的Microsoft帐户,(UserName,Password)/(ClientId,ClientSecret)任选一组即可
strPasswordTruestring""Microsoft帐户密码
strClientIdTruestring""具有SharePoint权限的应用ClientId,(UserName,Password)/(ClientId,ClientSecret)任选一组即可
strClientSecretTruestring""应用的ClientSecret

返回结果

spCtx,将命令运行后的结果赋值给此变量。

运行实例

/*********************************连接到SharePoint*******************************
命令原型:
spCtx = SharePoint.Connect(strURL ,strUserName ,strPassword ,strClientId, strClientSecret)
入参:
strURL--site地址。注:SharePoint site地址
strUserName--用户名。注:具有SharePoint权限的Microsoft帐户,(UserName,Password)/(ClientId,ClientSecret)任选一组即可
strPassword--密码。注:Microsoft帐户密码
strClientId--ClientId。注:具有SharePoint权限的应用ClientId,(UserName,Password)/(ClientId,ClientSecret)任选一组即可
strClientSecret--ClientSecret。注:应用的ClientSecret
出参:
spCtx--函数调用的输出保存到的变量。
注意事项:

********************************************************************************/
Dim spCtx = ""
spCtx = SharePoint.Connect("" ,"" ,"" ,"", "")
TracePrint(spCtx)

可视化样例