Account API - GetInfo as another user

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
Post Reply
Furgas
Posts: 4
Joined: Wed Jan 18, 2017 10:30 am

Account API - GetInfo as another user

Post by Furgas »

Hi,

I'm trying to call GetInfo method on Account API as another account.

Preparation:
- created account.admin@example.com and account.user@example.com
- assigned delegated admin and getAccountInfo right on domain

Code: Select all

zmprov ma account.admin@example.com zimbraIsDelegatedAdminAccount TRUE
zmprov grr domain example.com usr account.admin@example.com +getAccountInfo
What I'm doing:
- authorize to Account API (also tried with Admin API) using account.admin@example.com
- call GetInfo on Account API with account.admin's auth token but in the context of account.user@example.com

Result:
permission denied: can not access account account.user@example.com

What am I doing wrong?
Furgas
Posts: 4
Joined: Wed Jan 18, 2017 10:30 am

Re: Account API - GetInfo as another user

Post by Furgas »

Answering myself:
- you need to login through Admin API, and use the token in Account API
- you need adminLoginAs permission (getAccountInfo is not needed)

Code: Select all

zmprov grr domain example.com usr account.admin@example.com +adminLoginAs
Post Reply