Connect to Office365
Command Description
Connect to the Office365 server
Command Prototype
o365Ctx = Office365.Connect(strTenant ,strClientId , strClientSecret ,strThumbprint, strPrivateKey ,strUserName ,strPassword)
Command parameter
parameter | required | type | Default value | describe |
---|---|---|---|---|
strTenant | True | string | "" | Office365 Tenant ID |
strClientId | True | string | "" | Application Client ID with relevant permissions |
strClientSecret | True | string | "" | Application's Client Secret |
strThumbprint | True | string | "" | Thumbprint |
strPrivateKey | True | string | "" | Private key |
strUserName | True | string | "" | Microsoft account with relevant permissions under the tenant |
strPassword | True | string | "" | Microsoft account password |
Return result
O365Ctx, Assign the result of running the command to this variable.
Run instance
/*********************************连接到Office365********************************
命令原型:
o365Ctx = Office365.Connect(strTenant ,strClientId , strClientSecret ,strThumbprint, strPrivateKey ,strUserName ,strPassword)
入参:
strTenant--租户ID,可在Azure门户中查看.注:Office365 租户ID
strClientId--ClientId.注:具有相关权限的应用ClientId
strClientSecret--ClientSecret.注:应用的ClientSecret
strThumbprint--Thumbprint.注:Thumbprint
strPrivateKey--PrivateKey.注:Private key
strUserName--用户名.注:租户下的具有相关权限的Microsoft帐户
strPassword--密码.注:Microsoft帐户密码
出参:
o365Ctx--函数调用的输出保存到的变量.
注意事项:
无
********************************************************************************/
Dim o365Ctx = ""
o365Ctx = Office365.Connect("" ,"" , "" ,"", "" ,"" ,"")
TracePrint(o365Ctx)