Addressbook.allAccounts
-----------------------

Queries list of account identifies for all accounts.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Addressbook](component_Addressbook.md) | [6.2](newinversion62.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

### Deprecated

This function was [deprecated](deprecated.md). Use [Contacts](component_Contacts.md) functions instead.

MBS( "Addressbook.allAccounts" ) ### Parameters

none

### Result

Returns list or error.

### Description

Queries list of account identifies for all accounts.  
### Examples

Show all accounts:

 Set Variable \[$accounts ; Value:MBS ( "Addressbook.allAccounts" )\]  
Set Variable \[$count ; Value:ValueCount($accounts )\]  
Set Variable \[$index ; Value:1\]  
Loop  
 Set Variable \[$account ; Value:GetValue($accounts ; $index )\]  
 Show Custom Dialog \["Identifier: " &amp; $account &amp; ¶ &amp;  
"Name: " &amp; MBS ( "[Addressbook.Account.Name](AddressbookAccountName.md)"; $account ) &amp; ¶ &amp;  
"Type: " &amp; MBS ( "[Addressbook.Account.Type](AddressbookAccountType.md)"; $account ) &amp; ¶ &amp;  
"Main: " &amp; MBS ( "[Addressbook.Account.isMainAccount](AddressbookAccountisMainAccount.md)"; $account ) &amp; ¶ &amp;  
"URL: " &amp; MBS ( "[Addressbook.Account.URL](AddressbookAccountURL.md)"; $account )\]  
 Set Variable \[$index ; Value:$index +1\]  
 Exit Loop If \[$index &gt; $count \]  
End Loop  
### See also

- [Addressbook.Account.isMainAccount](AddressbookAccountisMainAccount.md)
- [Addressbook.Account.Name](AddressbookAccountName.md)
- [Addressbook.Account.Type](AddressbookAccountType.md)
- [Addressbook.Account.URL](AddressbookAccountURL.md)
- [Addressbook.defaultAccount](AddressbookdefaultAccount.md)
- [Addressbook.enabledAccounts](AddressbookenabledAccounts.md)

This function is free to use.

Created 17th March 2016 , last changed 25th February 2026

  
[Addressbook.addRecord](AddressbookaddRecord.md) - [Addressbook.defaultAccount](AddressbookdefaultAccount.md)

[HTML Version](AddressbookallAccounts.shtml)