Skip to main content
Version: v6.5.0

Connect to SharePoint

Command Description

Connect to SharePoint server

Command Prototype

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

Command parameter

parameterrequiredtypeDefault valuedescribe
strURLTruestring""SharePoint site address
strUserNameTruestring""A Microsoft account with SharePoint permissions, choose one of the following groups: (UserName, Password)/(ClientId, ClientSecret)
strPasswordTruestring""Microsoft account password
strClientIdTruestring""Choose one of the following groups for an application with SharePoint permissions: Client ID, (UserName, Password)/(Client ID, Client Secret)
strClientSecretTruestring""Application's Client Secret

Return result

SpCtx, Assign the result of running the command to this variable.

Run instance

/*********************************连接到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)

Visual Example