Skip to main content
Version: v6.5.0

Connect to Office365

Command Description​

Connect to the Office365 server

Command Prototype​

o365Ctx = Office365.Connect(strTenant ,strClientId , strClientSecret ,strThumbprint, strPrivateKey ,strUserName ,strPassword)

Command parameter​

parameterrequiredtypeDefault valuedescribe
strTenantTruestring""Office365 Tenant ID
strClientIdTruestring""Application Client ID with relevant permissions
strClientSecretTruestring""Application's Client Secret
strThumbprintTruestring""Thumbprint
strPrivateKeyTruestring""Private key
strUserNameTruestring""Microsoft account with relevant permissions under the tenant
strPasswordTruestring""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)