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

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

问题描述

我们已经交换了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在线版中可以正常工作.我在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是否只能在Office Online上使用,而不在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构建插件,而客户没有在线办公室,将如何在Prem交换服务器上对客户进行这项工作.

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.

推荐答案

基于上面的评论,如果遇到缺少签名证书"问题,可能是因为Admin Server从未创建过一个新证书.这些步骤可以解决问题.

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)使用

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插件"Office.context.mailbox.getCallbackTokenAsync"返回响应“失败".在我的Exchange 2016上但可在Office 365在线上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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