连接到SharePoint
命令说明
连接到SharePoint服务器
命令原型
spCtx = SharePoint.Connect(strURL ,strUserName ,strPassword ,strClientId, strClientSecret)
命令参数
参数 | 必选 | 类型 | 默认值 | 说明 |
---|---|---|---|---|
strURL | True | string | "" | SharePoint site地址 |
strUserName | True | string | "" | 具有SharePoint权限的Microsoft帐户,(UserName,Password)/(ClientId,ClientSecret)任选一组即可 |
strPassword | True | string | "" | Microsoft帐户密码 |
strClientId | True | string | "" | 具有SharePoint权限的应用ClientId,(UserName,Password)/(ClientId,ClientSecret)任选一组即可 |
strClientSecret | True | string | "" | 应用的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)