Quote:
Originally Posted by Roger75 When using Java API, how do I get zimbraId? |
The XML you would need to send is:
Code:
<GetAccountRequest attrs="zimbraId" xmlns="urn:zimbraAdmin">
<account by="name">address@domain.tld</account>
</GetAccountRequest>
The trick here is passing the attrs= attribute to tell it you want the zimbraId, although from the response output, I'm guessing you probably get that back with every request anyway as the id= attribute of the account object in the response.
The above will give you back something like this:
Code:
<GetAccountResponse xmlns="urn:zimbraAdmin">
<account id="53738983-181d-44a0-baec-26ddbc224d54" name="address@domain.tld">
<a n="zimbraId">53738983-181d-44a0-baec-26ddbc224d54</a>
</account>
</GetAccountResponse>