user63273: In documentation said: "listaccounts will be removed in a later version of Bitcoin Core"
https://bitcoin.org/en/developer-reference#listaccounts

In "See Also" section:  
GetAccount - Not return list accounts
  GetAddressesByAccount [deprecated]
  ListReceivedByAccount [deprecated]  

Are we have a alternative command ?

user-1: You can still use the same commands to get a list of accounts and addresses 
getaddressesayaccount: returns a list of every address assigned to a particular account.

listreceivedbyaccount: lists the total number of bitcoins received by each account.

Or as a workaround you can try the trick with the following:
listaddressgroupings: lists groups of addresses that may have had their common ownership made public by common use as inputs in the same transaction or from being used as change from a previous transaction.

listtransactions "*" 1 0 true: List the most recent transaction from all accounts including watch-only addresses.

More info on the available commands to list accounts/addresses: https://bitcoin.org/en/developer-reference
Hope this helps,
kind regards.
Cluster2k

63273: <p>In documentation said: "listaccounts will be removed in a later version of Bitcoin Core"</p>

<p><a href="https://bitcoin.org/en/developer-reference#listaccounts" rel="nofollow noreferrer">https://bitcoin.org/en/developer-reference#listaccounts</a></p>

<blockquote>
  <p>In "See Also" section:  </p>
  
  <p>GetAccount - Not return list accounts<br>
  GetAddressesByAccount [deprecated]<br>
  ListReceivedByAccount [deprecated]  </p>
</blockquote>

<p>Are we have a alternative command ?</p>
 -1: <p>You can still use the same commands to get a list of accounts and addresses </p>

<pre><code>getaddressesayaccount: returns a list of every address assigned to a particular account.

listreceivedbyaccount: lists the total number of bitcoins received by each account.
</code></pre>

<p>Or as a workaround you can try the trick with the following:</p>

<pre><code>listaddressgroupings: lists groups of addresses that may have had their common ownership made public by common use as inputs in the same transaction or from being used as change from a previous transaction.

listtransactions "*" 1 0 true: List the most recent transaction from all accounts including watch-only addresses.
</code></pre>

<p>More info on the available commands to list accounts/addresses: <a href="https://bitcoin.org/en/developer-reference" rel="nofollow noreferrer">https://bitcoin.org/en/developer-reference</a></p>

<p>Hope this helps,</p>

<p>kind regards.</p>

<p><em>Cluster2k</em></p>
