要求:
当用户点击Custom Command Button
发送电子邮件时。
访问令牌: 我们使用以下代码获取访问令牌。
Office.context.mailbox.getCallbackTokenAsync({ isRest: true }, function(result) {})
我们取得的成就:
我们能够使用带有访问令牌Custom Command Button
的 REST API发送电子邮件。https://outlook.office.com/api/v2.0/me/sendmail
REST API 的问题:
我们了解到 Outlook 邮件 REST API 已被弃用,将从November 2022
替换 API/服务:
如 Outlook API 文档中所述,我们需要使用Graph API
.
替换 API/服务
的问题:根据文档,我们需要为此 API 设置 SSO/OAuth。但我们不想做这些事情。我们只想让解决方案保持简单,即当用户单击Custom Command Button
发送电子邮件时使用任何身份验证过程。
问题
是否有任何方法/方式我们可以使用访问令牌直接调用图形 API 而无需任何 SSO/OAuth/Azure 设置?目前我们正在收到401 Unauthorised Access
错误消息。