zimbra-api / soap-api

Zimbra SOAP client in PHP language
BSD 3-Clause "New" or "Revised" License
62 stars 48 forks source link

"permission denied: need adequate admin token" issue in Zimbra 9.0.0_ZEXTRAS_20210811 (build 20210830124411) | Postman #52

Open 0ankitcodes1 opened 2 years ago

0ankitcodes1 commented 2 years ago

This is the request that I am sending to zimbra server. And I am using postman for testing this

This is zimbra " Zimbra 9.0.0_ZEXTRAS_20210811 (build 20210830124411) " that I am running in server

I have generate authToken using a username which as administrative access.

Can anyone have solution to this problem?

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
   <soap:Header>
      <context xmlns="urn:zimbra">
         <authToken>0_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</authToken>
      </context>
   </soap:Header>
   <soap:Body>
        <CreateAccountRequest xmlns="urn:zimbraAdmin" name="testuser@example.com">
            <a n="displayName">Test User</a>
            <password>testpassword</password>
        </CreateAccountRequest>
   </soap:Body>
</soap:Envelope>

This is the error that I am getting

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
        <context xmlns="urn:zimbra">
            <change token="26999"/>
        </context>
    </soap:Header>
    <soap:Body>
        <soap:Fault>
            <soap:Code>
                <soap:Value>soap:Sender</soap:Value>
            </soap:Code>
            <soap:Reason>
                <soap:Text>permission denied: need adequate admin token</soap:Text>
            </soap:Reason>
            <soap:Detail>
                <Error xmlns="urn:zimbra">
                    <Code>service.PERM_DENIED</Code>
                    <Trace>qtp195615004-132:1651166999211:fedd1b5adb872a47</Trace>
                </Error>
            </soap:Detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>