Microsoft Web Addins“Office.context.mailbox.getCallbackTokenAsync"返回响应“失败"在我的 Exchange 2016 上,但在 office 365 online 中工作 [英] Microsoft Web Addins "Office.context.mailbox.getCallbackTokenAsync" returns response "Failed" on my Exchange 2016 but works in office 365 online

查看:25
本文介绍了Microsoft Web Addins“Office.context.mailbox.getCallbackTokenAsync"返回响应“失败"在我的 Exchange 2016 上,但在 office 365 online 中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有 Exchange 2016 服务器,我们最近更新到 CU-12 因为我们认为它可能是服务器更新的东西,但现在似乎它也不适用于更新

We have exchange 2016 sever which we have updated to CU-12 recently because we thought it might be the sever update thing, but now it seems it don't works with update too

我只是在传递令牌的帮助下使用 Rest API 来使用 Addin 从当前邮件中获取一些字段.

I am simply using Rest API with the help of passing token to get some fields from the current mail using Addin.

但是每次调用函数Office.context.mailbox.getCallbackTokenAsync"时它都会抛出响应失败".

But It throws an response "failed" every time when the function "Office.context.mailbox.getCallbackTokenAsync" is called.

代码:

 1 Office.context.mailbox.getCallbackTokenAsync({isRest: true, "asyncContext" : this.__archiveComponent}, function(result){
 2 if (result.status === "succeeded") {
 3    let accessToken = result.value;
 4    result.asyncContext.getMultiValueExtendedProperty(accessToken,data[0]);
 5 } else {
 6     var err = result.name;
 7     console.log(err.name + ": " + err.message);
 8   }
 9 });

错误:在浏览器控制台中,JSON 响应的详细信息是:

Error:in browser console the JSON response in details is:

{"Header":{"ServerVersionInfo":{"MajorVersion":15,
"MinorVersion":1,
"MajorBuildNumber":1713,
"MinorBuildNumber":5,
"Version":"V2017_07_11"
}},

"Body":{"ResponseMessages":{
"Items":[{"__type":"GetClientAccessTokenResponseMessage:#Exchange",
"MessageText":"The token for this extension could not be retrieved.",
"ResponseCode":"ErrorInvalidClientAccessTokenRequest",
"ResponseClass":"Error",
"Token":null}]
}}}

注意:这在 Office 365 online 中工作正常.我在 OnPrem 服务器上部署了相同的Exchange 2016 CU-12 更新.

Note: This works fine in Office 365 online . I deployed the same on a OnPrem server Exchange 2016 CU-12 update.

如果有人修复了相同的问题,希望应该得到一些详细的解释.我觉得肯定有一些配置,但需要一个指导.

Hope should get some detailed explanation if anyone has fixed the same. I feel that there must be some configuration ,but need a guidance.

我有一些疑问

  1. Rest Api 是否仅适用于在线办公室而不适用于 OnPrem 交换服务器?

  1. Does Rest Api only works with office online and not on OnPrem exchange server?

还是必须在线交换才能使用 HYBRID 与 onPrem Exchange 服务器进行此工作?

Or is it compulsory to have exchange online to get this work with onPrem Exchange server using HYBRID?

如果是,那么如果我们使用 rest API 构建插件并且客户没有在线办公室,那么在客户 onPrem 交换服务器上获得这项工作的方法是什么.

If Yes then if we build an addin with rest API and customer dont have office online what would be the way to get this work on customer onPrem exchange server.

更多信息:我也看到类似这样的问题类似问题但没有相关的答案或建议我看到这清除了我的上述问题.

More Info: I also See the similar question like this Similar question but there is no relevant answer or suggession i see which clears my above questions.

推荐答案

根据上面的评论,如果您遇到缺少签名证书的问题,可能是因为管理服务器从未创建过新证书.这些步骤可能会解决问题.

Based on the comments above, if you are hitting the Missing Signing Certificate issue, it could be because the Admin Server never created a new one. These steps may solve the issue.

1) 使用 New-ExchangeCertificate cmdlet

1) Create new self-signed certificate using New-ExchangeCertificate cmdlet

2) 使用 Set-AuthConfig cmdlet 来设置指纹并发布在步骤 #1 中创建的证书

2) Modify the authorization configuration using Set-AuthConfig cmdlet to set thumbprint and publish the certificate created in step #1

这篇关于Microsoft Web Addins“Office.context.mailbox.getCallbackTokenAsync"返回响应“失败"在我的 Exchange 2016 上,但在 office 365 online 中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆