Results 1 to 2 of 2

Thread: [SOLVED] Get list of users from distribution list using SOAP

  1. #1
    Join Date
    Sep 2008
    Posts
    71
    Rep Power
    7

    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"?

  2. #2
    Join Date
    Sep 2008
    Posts
    71
    Rep Power
    7

    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...

Similar Threads

  1. Problem syncing all folders
    By mark_the_chain in forum Error Reports
    Replies: 0
    Last Post: 11-23-2008, 03:59 PM
  2. Replies: 3
    Last Post: 08-27-2008, 08:38 AM
  3. Replies: 4
    Last Post: 01-29-2008, 07:43 PM
  4. Distribution list to all users at domain
    By cirrus_blue in forum Users
    Replies: 9
    Last Post: 05-16-2007, 09:44 AM
  5. Cant add users to distribution list after 4.5 upgrade
    By cangeceiro in forum Installation
    Replies: 8
    Last Post: 02-06-2007, 07:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •