我想通过EWS从Exchange服务器获取所有用户。我已经意识到可以按照回答here
中的描述使用FindPeople SOAP请求正如它在回答中所述,这需要AddressListId。因此,我必须使用PowerShell在Exchange上创建GlobalAddressList。
我已经在这些instructions
之后创建了GlobalAddressList我不知道如何将用户添加到GlobalAddressList中?
列表中没有用户的事件我应该能够获得空列表吗?所以我试过了。
这是请求:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<RequestServerVersion Version="Exchange2013_SP1" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" />
</soap:Header>
<soap:Body>
<FindPeople xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<IndexedPageItemView MaxEntriesReturned="100" Offset="0" BasePoint="Beginning" />
<ParentFolderId>
<AddressListId Id="someId" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" />
</ParentFolderId>
</FindPeople>
</soap:Body>
</soap:Envelope>
&#34; someId&#34;上面的值是我创建的GlobalAddressList的GUID。
以下是我得到的错误回复。
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<s:Envelope
xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">
<s:Header>
<Action s:mustUnderstand=\"1\"
xmlns=\"http://schemas.microsoft.com/ws/2005/05/addressing/none\">*
</Action>
</s:Header>
<s:Body>
<s:Fault>
<faultcode
xmlns:a=\"http://schemas.microsoft.com/exchange/services/2006/types\">a:ErrorInternalServerError
</faultcode>
<faultstring xml:lang=\"en-US\">An internal server error occurred. The operation failed.</faultstring>
<detail>
<e:ResponseCode
xmlns:e=\"http://schemas.microsoft.com/exchange/services/2006/errors\">ErrorInternalServerError
</e:ResponseCode>
<e:Message
xmlns:e=\"http://schemas.microsoft.com/exchange/services/2006/errors\">An internal server error occurred. The operation failed.
</e:Message>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
我不确定是什么问题,或者我是否在正确的轨道上。
我很感激有关如何让用户使用EWS的任何建议。假定在Office365面板或PowerShell访问Exchange中进行修改的解决方案也可以。
请就此提出建议。
答案 0 :(得分:1)
你不应该创建一个新的Gal,你只需要使用Get-GlobalAddressList cmdlet technet.microsoft.com/en-us/library/aa996579(v=exchg.160).aspx来获取Id的ID正在使用的默认GAL。如果您无权访问cmdlet,则需要确保您使用的帐户在RBAC中具有地址列表角色
格伦