Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-01-2008, 11:40 AM
Senior Member
 
Posts: 71
Default [SOLVED] Get list of users from distribution list using SOAP

I am trying to retrieve the list of users in a distribution list.
So far I was working out the following SOAP request to be sent to the server:

Code:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<context xmlns="urn:zimbra">
<authToken>0_.....</authToken>
<sessionId id=".....">.....</sessionId>
</context>
</soap:Header>
<soap:Body>
<SearchDirectoryRequest xmlns="urn:zimbraAdmin" 
offset="0" limit="2000" 
sortBy="name" sortAscending="1" 
attrs="displayName,zimbraId,zimbraMailHost,uid,description,zimbraMailStatus,zimbraMailForwardingAddress" 
types="distributionlists">
<query xmlns="">zimbraMailAlias=it@example.com</query>
</SearchDirectoryRequest>
</soap:Body>
</soap:Envelope>
The problem is, that this returns in the SOAP response also the aliases which are defined for users.
Could anybody give me a hint how to modify the query to get only "objectClass=zimbraAccount"?
Reply With Quote
  #2 (permalink)  
Old 12-03-2008, 04:23 AM
Senior Member
 
Posts: 71
Default [SOLVED] Get list of users from distribution list using SOAP

I created a workaround by handling the response:
1. extracting all zimbraId's and
2. doing "array_unique" in PHP

If anybody would have a more efficient way...
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.