Using SOAP API to create contacts on users address books as an admin

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
rmontagud
Posts: 4
Joined: Fri Dec 12, 2014 10:21 am

Using SOAP API to create contacts on users address books as an admin

Post by rmontagud »

Can you act as an user the same way as view mail allows you with the admin console? Let's say i'm AdminA and i want to create on all my users under a certain domain a contact group without knowing their passwords.

I've seen the DelegatedAuthRequest method but i'm not familiar with the whole flow. If i use zmsoap -z -m user@domain.com GetContactsRequest i see the user's address book some examples in any language would be helpful, PHP prefered
Thanks
rmontagud
Posts: 4
Joined: Fri Dec 12, 2014 10:21 am

Using SOAP API to create contacts on users address books as an admin

Post by rmontagud »

A word of advice after getting a clue of how it works: avoid current PHP libraries for zimbra, they're poorly documented and mostly designed to use the zimbraAdmin part not to mention some overcomplicate things for the sake of "clean code". Using the native SOAP module is painful but will help you to get things done



After my personal rant I can say getting the auth token to work with the correct account is pretty straightforward: Auth (admin) -> GetAccount to check if account exists -> Request auth token for user. You can now run requests as the delegated user
Post Reply