Is it possible to write a query to pull records from contact builder all contacts.

1 Answer 1


Here’s a workaround provided by Salesforce to query All contacts:

1) In MobileConnect or MobilePush, create a filtered mobile list that meets the condition: Contact Key is not null

2) Use a SQL Query Activity to query from this list into a new Data Extension (DE).

3) Create a new DE with one field titled SubscriberKey, make this field a Primary Key. Make the DE sendable.

4) In Automation Studio, create an SQL query that resembles the below. 

select subscriberkey from [name of MobileConnect/MobilePush filtered list name]

5) For the target Object, select the newly created DE. Save it, then place it in an Automation and run the Automation once to populate the DE.

Note: You must have MobileConnect or MobilePush to complete these steps.

Here’s an article that describes this process: Permanently remove Contacts or Subscribers and associated data from Contact Builder

  • 3
    Along with Subscriberkey how to query remaining fields like Mobile number, Email address, Device Id, Channel and modified date using in the same SQL Activity to query from this list to in to a new data extension(DE)
    – Sfdcprgmr
    Commented Jun 21, 2021 at 13:18
  • Thanks, great idea to revamp orphan contact process to export All Contacts. At first I thought this would not export regular mail channel subscribers because the starting point is a mobile list. But, a list is basically a set of subscribers, so the list being mobile (nothing to do with email studio list, which are different animals) is not important for the matter. Commented Jul 30, 2022 at 10:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .