连接到Office365
命令说明
连接到Office365服务器
命令原型
o365Ctx = Office365.Connect(strTenant ,strClientId , strClientSecret ,strThumbprint, strPrivateKey ,strUserName ,strPassword)
命令参数
参数 | 必选 | 类型 | 默认值 | 说明 |
---|---|---|---|---|
strTenant | True | string | "" | Office365 租户ID |
strClientId | True | string | "" | 具有相关权限的应用ClientId |
strClientSecret | True | string | "" | 应用的ClientSecret |
strThumbprint | True | string | "" | Thumbprint |
strPrivateKey | True | string | "" | Private key |
strUserName | True | string | "" | 租户下的具有相关权限的Microsoft帐户 |
strPassword | True | string | "" | Microsoft帐户密码 |
返回结果
o365Ctx,将命令运行后的结果赋值给此变量。
运行实例
/*********************************连接到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)