Connect to SharePoint
Command Description
Connect to SharePoint server
Command Prototype
spCtx = SharePoint.Connect(strURL ,strUserName ,strPassword ,strClientId, strClientSecret)
Command parameter
parameter | required | type | Default value | describe |
---|---|---|---|---|
strURL | True | string | "" | SharePoint site address |
strUserName | True | string | "" | A Microsoft account with SharePoint permissions, choose one of the following groups: (UserName, Password)/(ClientId, ClientSecret) |
strPassword | True | string | "" | Microsoft account password |
strClientId | True | string | "" | Choose one of the following groups for an application with SharePoint permissions: Client ID, (UserName, Password)/(Client ID, Client Secret) |
strClientSecret | True | string | "" | 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)