Page 1 of 1

GetAccountRequest (Admin SOAP) returns NO_SUCH_ACCOUNT even though account exists

Posted: Thu Jan 08, 2026 3:11 pm
by haimeo1201
I want to call Admin SOAP GetAccountRequest to read the user’s Sieve filter script:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:zimbraAdmin="urn:zimbraAdmin">

<soapenv:Header>
<context xmlns="urn:zimbra">
<authToken>ADMIN_AUTH_TOKEN</authToken>
</context>
</soapenv:Header>

<soapenv:Body>
<zimbraAdmin:GetAccountRequest attrs="zimbraMailSieveScript">
<zimbraAdmin:account by="name">
user@domain.com
</zimbraAdmin:account>
</zimbraAdmin:GetAccountRequest>
</soapenv:Body>

</soapenv:Envelope>

The request consistently returns:
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>no such account: user@domain.com</faultstring>
<detail>
<Error xmlns="urn:zimbra">
<Code>account.NO_SUCH_ACCOUNT</Code>
</Error>
</detail>
</soap:Fault>

Has anyone successfully use this api? Really need your help :(
I can provide logs if needed

Re: GetAccountRequest (Admin SOAP) returns NO_SUCH_ACCOUNT even though account exists

Posted: Thu Jan 08, 2026 3:29 pm
by ghen
That should work if the account actually exists.

It's equivalent to "zmprov getAccount user@domain.com zimbraMailSieveScript" on the command line.