I'm trying to get the status from an accont: zimbraAccountStatus but I don't know how to do it with soap.
I'm able to change the value with "ModifyAccountRequest" and set it to active, maintenance, closed or locked. However, I don't know how to check it.
Any help is welcome!
Check an account
Re: Check an account
I've found the solution:
You have to do a GetAccountRequest with attrs="zimbraAccountStatus" like this:
You have to do a GetAccountRequest with attrs="zimbraAccountStatus" like this:
Code: Select all
<?xml version="1.0" ?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header><context xmlns="urn:zimbra"><format type="xml"/><authToken>%s</authToken>
</context></soap:Header><soap:Body>
<GetAccountRequest applyCos="1" attrs="zimbraAccountStatus" xmlns="urn:zimbraAdmin">
<account by="name">%s</account>
</GetAccountRequest>
</soap:Body></soap:Envelope>' % (self.TOKEN, account)