获取代表 EWS API 返回空响应
Get Delegates EWS API returning empty response
我一直在使用 EWS managed APIs 来获取与交换管理相关的信息。 getDelegates 总是调用 returns 一个空响应,即使我配置了委托并且我实际上在审计日志中看到了事件以进行交换。其他 API 调用(如获取收件箱规则等)使用相同的方法工作得很好。
为了让委托用户通过 EWS 访问邮箱,我还需要做些什么吗?或者这是否不受支持?
这是请求 xml:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header>
<t:RequestServerVersion Version="Exchange2013" />
<t:ExchangeImpersonation>
<t:ConnectingSID>
<t:PrincipalName>u2@xyz.com</t:PrincipalName>
</t:ConnectingSID>
</t:ExchangeImpersonation>
</soap:Header>
<soap:Body>
<m:GetDelegate IncludePermissions="true">
<m:Mailbox>
<t:EmailAddress>u2@xyz.com</t:EmailAddress>
</m:Mailbox>
</m:GetDelegate>
</soap:Body>
</soap:Envelope>
这是回复
<?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="1084" MinorBuildNumber="30" Version="V2017_04_14" 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:GetDelegateResponse ResponseClass="Success" 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:ResponseCode>NoError</m:ResponseCode>
<m:DeliverMeetingRequests>DelegatesOnly</m:DeliverMeetingRequests>
</m:GetDelegateResponse>
</s:Body>
</s:Envelope>
能够解决这个问题。委托共享的建模方式似乎发生了变化。通过 EAC 或办公室门户分配具有完全访问权限的代理权限的旧方法不再有效。它不会显示为代表。这已得到 MS 支持工程师的确认。
我让代理人工作的唯一方法是添加对用户邮箱中特定文件夹具有权限的用户。可以在此处找到更多信息:
通过 outlook 客户端配置:
https://blogs.office.com/2013/09/04/configuring-delegate-access-in-outlook-web-app/
我一直在使用 EWS managed APIs 来获取与交换管理相关的信息。 getDelegates 总是调用 returns 一个空响应,即使我配置了委托并且我实际上在审计日志中看到了事件以进行交换。其他 API 调用(如获取收件箱规则等)使用相同的方法工作得很好。
为了让委托用户通过 EWS 访问邮箱,我还需要做些什么吗?或者这是否不受支持?
这是请求 xml:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header>
<t:RequestServerVersion Version="Exchange2013" />
<t:ExchangeImpersonation>
<t:ConnectingSID>
<t:PrincipalName>u2@xyz.com</t:PrincipalName>
</t:ConnectingSID>
</t:ExchangeImpersonation>
</soap:Header>
<soap:Body>
<m:GetDelegate IncludePermissions="true">
<m:Mailbox>
<t:EmailAddress>u2@xyz.com</t:EmailAddress>
</m:Mailbox>
</m:GetDelegate>
</soap:Body>
</soap:Envelope>
这是回复
<?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="1084" MinorBuildNumber="30" Version="V2017_04_14" 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:GetDelegateResponse ResponseClass="Success" 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:ResponseCode>NoError</m:ResponseCode>
<m:DeliverMeetingRequests>DelegatesOnly</m:DeliverMeetingRequests>
</m:GetDelegateResponse>
</s:Body>
</s:Envelope>
能够解决这个问题。委托共享的建模方式似乎发生了变化。通过 EAC 或办公室门户分配具有完全访问权限的代理权限的旧方法不再有效。它不会显示为代表。这已得到 MS 支持工程师的确认。
我让代理人工作的唯一方法是添加对用户邮箱中特定文件夹具有权限的用户。可以在此处找到更多信息:
通过 outlook 客户端配置: https://blogs.office.com/2013/09/04/configuring-delegate-access-in-outlook-web-app/