Service: zimbraAccount

Command: DiscoverRights
Namespace: urn:zimbraAccount
Description: Return all targets of the specified rights applicable to the requested account.

Notes:

  1. This call only discovers grants granted on the designated target type of the specified rights. It does not return grants granted on target types the rights can inherit from.
  2. For sendAs, sendOnBehalfOf, sendAsDistList, sendOnBehalfOfDistList rights, name attribute is not returned on <target> elements. Instead, addresses in the target entry's zimbraPrefAllowAddressForDelegatedSender are returned in <e a="{email-address}"/> elements under the <target> element.
    If zimbraPrefAllowAddressForDelegatedSender is not set on the target entry, the entry's primary email address will be return in the only <e a="{email-address}"/> element under the <target> element.
  3. For all other rights, name attribute is always returned on <target> elements, no <e a="{email-address}"/> will be returned. name attribute contains the entry's primary name.
e.g.
 <DiscoverRightsRequest>
    <right>sendAs</right>
    <right>sendAsDistList</right>
    <right>viewFreeBusy</right>
 </DiscoverRightsRequest>

 <DiscoverRightsResponse>
    <targets right="sendAs">
       <target type="account" id="...">
          <e a="user-one@test.com"/>
          <e a="user.one@test.com"/>
       </target>
       <target type="account" id="...">
          <e a="user2@test.com"/>
       </target>
    </targets>
    <targets right="sendAsDistList">
       <target type="dl" id="...">
          <e a="group1@test.com"/>
          <e a="group-one@test.com"/>
       </target>
       <target type="dl" id="...">
          <e a="group2@test.com"/>
          <e a="group-two@test.com"/>
       </target>
    </targets>
    <targets right="viewFreeBusy">
       <target type="account" id="..." name="user1@test.com">
    </targets>
 </DiscoverRightsResponse>
 
Properties:
Authorization token required true
Admin Authorization token required false

DiscoverRightsRequest

    <DiscoverRightsRequest> ## DiscoverRightsRequest
        (<right>{rights} (String)</right>)+
    </DiscoverRightsRequest>

elements and attributes you can define within a <DiscoverRightsRequest> element:

XPath Required / Optional Description
/right Required (1 or more) Type: {rights} (String)
The rights.

DiscoverRightsResponse

    <DiscoverRightsResponse> ## DiscoverRightsResponse
        (<targets right="{targets-right}"> ## DiscoverRightsInfo
            (<target
                        type="{target-type} (account | calresource | cos | dl | group | domain | server | xmppcomponent | zimlet | config | global)"
                        [id="{target-id}"] [name="{target-name}"] [d="{target-display-name}"]> ## DiscoverRightsTarget
                (<email addr="{email-address}" /> ## DiscoverRightsEmail)*
             </target>)+
          </targets>)*
    </DiscoverRightsResponse>

elements and attributes you can define within a <DiscoverRightsResponse> element:

XPath Required / Optional Description
/targets Optional (0 or more) Information about targets for rights
/targets@right Required (only 1) Type: String
Right the targets relate to
/targets/target Required (1 or more) Targets
/targets/target@type Required (only 1) Type: account | calresource | cos | dl | group | domain | server | xmppcomponent | zimlet | config | global
Target type
/targets/target@id Optional (0 or 1) Type: String
Target ID
/targets/target@name Optional (0 or 1) Type: String
Target name
/targets/target@d Optional (0 or 1) Type: String
If a discovered target is an account or a group and the entry has a display name set then this is set to that display name.
/targets/target/email Optional (0 or more) Email addresses
/targets/target/email@addr Required (only 1) Type: String
Email address