gpt4 book ai didi

office-js - 如何在 Microsoft Office JS 插件中获取用户电子邮件?

转载 作者:行者123 更新时间:2023-12-04 12:25:55 27 4
gpt4 key购买 nike

我想让用户通过电子邮件检查他在服务中的信用。最好没有像我们在 Google Docs 插件中那样的任何 SSO 魔法 https://developers.google.com/apps-script/reference/base/user

最佳答案

userProfile 对象包含成员 emailAddress它返回用户的 SMTP 电子邮件地址的字符串。这个成员可以从 1.0 级别的 API 和使用示例中获得,看起来像......

// Example: allieb@contoso.com
Office.initialize = function (reason) {
$(function () {
console.log(Office.context.mailbox.userProfile.emailAddress);
}
}

请注意 :当前用于 Word/Excel/PowerPoint 的 Office.js API 不提供检索用户名/电子邮件地址的功能。

关于office-js - 如何在 Microsoft Office JS 插件中获取用户电子邮件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49174140/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com