- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Office 365 不会在响应 header 中返回 X-BackendOverrideCookie。
我在请求 header 中正确设置了 X-AnchorMailbox 和 X-PreferServerAffinity。这不会触发 X-BackendOverrideCookie 返回,正如 MSDN 中所说。为什么会这样?
同时,我在内部部署的 Exchange 2016 上尝试了同样的事情。在这里我什至没有设置 X-AnchorMailbox 和 X-PreferServerAffinity,我在每个响应中都返回了 X-BackendOverrideCookie。这也不好,因为我需要管理拉取和推送通知组的关联性,并且我需要在需要时设置此 cookie,而不是在默认情况下始终设置它。
编辑 1:
流程是这样的。我正在使用 JS 发送订阅请求。为此,我使用 lather将我的请求包装成 SOAP 格式。
这是该操作的样子:
var impersonate = ‘myroomresource@mydomain.com’
var subscribe = {
"m:Subscribe": {
"m:PullSubscriptionRequest": {
"t:FolderIds": {
"t:DistinguishedFolderId": {
attributes: [{
'Id': this.distinguishedFolderId
}]
}
},
"t:EventTypes": [{
"t:EventType": "CreatedEvent"
}, {
"t:EventType": "DeletedEvent"
}, {
"t:EventType": "ModifiedEvent"
}],
"t:Timeout": "10"
}
}
};
soapHeader = {
“t:ExchangeImpersonation": {
"t:ConnectingSID": {
't:SmtpAddress': impersonate
}
}
}
lather.up({
body : requestName,
headers : {
Authorization : lather.basicAuth(this.username, this.password),
'X-AnchorMailbox': impersonate,
'X-PreferServerAffinity': true
},
additionalNamespaces : [
'xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"',
'xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"',
],
soapHeader : soapHeader,
method : 'POST',
url : ‘https://outlook.office365.com/EWS/Exchange.asmx',
}, function(error, res, body) {
// Process the response
})
headers:
{ Authorization: 'Basic c29m…’, (shortened just in case)
'X-AnchorMailbox': ‘myroomresource@mydomain.com', (fake mail)
'X-PreferServerAffinity': true,
'Content-Length': 971,
'Content-Type': 'text/xml; charset=utf-8',
host: 'outlook.office365.com' }
<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo MajorVersion="15" MinorVersion="1" MajorBuildNumber="693" MinorBuildNumber="12" Version="V2016_10_10" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/></s:Header><s:Body><m:SubscribeResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:SubscribeResponseMessage ResponseClass=“Success”><m:ResponseCode>NoError</m:ResponseCode><m:SubscriptionId>KQB2aTFwcjA…wucsA==</m:SubscriptionId><m:Watermark>AQAAAFQ+2wmbaZF…JAAAAAAA=</m:Watermark></m:SubscribeResponseMessage></m:ResponseMessages></m:SubscribeResponse></s:Body></s:Envelope>
{ 'cache-control': 'private',
'transfer-encoding': 'chunked',
'content-type': 'text/xml; charset=utf-8',
server: 'Microsoft-IIS/8.5',
'request-id': ‘2881ab3…1ec461’,
'x-calculatedbetarget': 'VI1PR0501MB2096.eurprd05.prod.outlook.com',
'x-backendhttpstatus': '200',
'set-cookie': [ ‘exchangecookie=d8f8…1e8; expires=Sat, 28-Oct-2017 08:41:27 GMT; path=/; HttpOnly' ],
'x-ewshandler': 'Subscribe',
'x-aspnet-version': '4.0.30319',
'x-diaginfo': 'VI1PR0501MB2096',
'x-beserver': 'VI1PR0501MB2096',
'x-powered-by': 'ASP.NET',
'x-feserver': 'VI1PR0901CA0093',
date: 'Fri, 28 Oct 2016 08:41:26 GMT' }
最佳答案
您的问题不包括 SOAP header ,但如果您遇到与我相同的问题,那么问题在于这些 header 中的 RequestServerVersion 参数。
具体来说,您需要包含以下内容:
<soap:Header>
<t:RequestServerVersion Version="Exchange2013_SP1"/>
</soap:Header>
关于office365 - Office 365 EWS 不返回 X-BackendOverrideCookie,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40238672/
我对 Office Scripts 和 Office Lab 感到困惑。 两者都可以在 Excel 中运行 javascript,但似乎无法在它们中共享代码。 对于 Office 脚本,一些代码如 f
如果我们加载一个引用 office.js 的网页在 Office 客户端之外,我们会收到警告:Office.js is loaded outside of Office client . 这些信息很有
我试图找到一种将 Outlook 插件发布到办公商店的方法。但我发现我们只能发布 Office 应用程序,而不能发布 Office 商店的加载项。因此我想知道 Office 应用程序和 Office
我想使用 Ooxml 以编程方式自定义“Heading1”和“Heading2”样式通过 office.js Visual Studio 代码中的库。我已经搜索过谷歌和许多文档,但仍然没有得到任何内容
我想使用 Microsoft.Office.Interop.Excel 从 XLS 文件中提取一些数据。我安装了 Visual Studio 2010 和 Office 开发人员工具。但是,我在 va
最近,Microsoft 推出了 Office 插件架构,该架构允许开发远程托管并在 Office 内的 IFrame 中运行的插件。我读了很多文章,试图了解这个架构是否是 VSTO 的替代品,或者它
我开发了一个将数据导入 Microsoft Excel 的应用程序。 我使用 VS2005 + .NET 2.0,并且我的计算机上安装了 Microsoft Office 2007 (Office 1
是否有推荐的方法(包、框架等)来设置 Office 加载项的自动化端到端测试。我对测试的所有搜索都导致侧加载应用程序和手动测试。 例如:https://dev.office.com/docs/add-
我们正在为 Excel 和 Word 开发 javascript Office 插件。我们的用户将使用 Office Desktop 和 Office Online。 当用户在加载项中创建新记录时,我
我在电子表格上有一个表格,我想删除所有现有数据。我使用下面的代码,除非表格已经是空的。 // Get the row count let rowCount = table.getRangeBetwee
所以我正在尝试开始开发 Office 365 加载项(以前的 Office 应用程序),我想知道 Office 在呈现您的应用程序时使用什么浏览器或浏览器引擎。我尝试使用 JavaScript 的 n
我正在寻找一些关于在 网上商店 上托管我们当前托管应用程序的更新版本的信息。 我的查询是,我们现有版本的应用程序说的 list 文件 版本。 1.0 托管在网上商店指向源位置(天蓝色 网站)说 mya
在我们的组织中,我们构建了一个 Office 加载项。现在我们想在我们的加载项中添加打印功能。谁能帮助我如何使用 Office javascript API 添加打印功能。 最佳答案 Office.J
我有兴趣了解有关 Microsoft Office Communicator 的更多信息IM 客户端,以及它如何确定您的存在(即您是在计算机旁还是不在)。任何人都可以向我指出解释这一点的教程或 API
问题: 我有两个电子表格,每个电子表格都有不同的用途,但包含一个特定的数据,这两个电子表格中的数据需要相同。这条数据(其中一列)在电子表格 A 中更新,但也需要在电子表格 B 中更新。 目标: 以某种
可在此处获得office.js的正式版本: https://appsforoffice.microsoft.com/lib/1/hosted/office.js 它在代码中包含以下几行: window
不久前我有了一个发现。只需按照以下步骤操作: 在 Office 2003 中创建一个 .doc/.xls/.ppt 文件。在其中保留一些测试数据并关闭该文件。现在重命名该文件以将其文件扩展名更改为随机
姓名:来自:file:///D:/Samples/TestUpdatedVersion/bin/Debug/TestUpdatedVersion.vsto 无法安装自定义,因为当前已安装另一个版本并且
已结束。此问题正在寻求书籍、工具、软件库等的推荐。它不满足Stack Overflow guidelines 。目前不接受答案。 我们不允许提出寻求书籍、工具、软件库等推荐的问题。您可以编辑问题,以便
我对使用 Office 2007 在 2007 之前的二进制格式(.doc、.xls、.ppt)和新的 Office Open XML 格式(.docx、.xlsx、.pptx)之间进行转换很感兴趣
我是一名优秀的程序员,十分优秀!