diff --git a/src/applications/tokens/query/PhabricatorTokenGivenQuery.php b/src/applications/tokens/query/PhabricatorTokenGivenQuery.php
--- a/src/applications/tokens/query/PhabricatorTokenGivenQuery.php
+++ b/src/applications/tokens/query/PhabricatorTokenGivenQuery.php
@@ -3,10 +3,16 @@
 final class PhabricatorTokenGivenQuery
   extends PhabricatorCursorPagedPolicyAwareQuery {
 
+  private $ids;
   private $authorPHIDs;
   private $objectPHIDs;
   private $tokenPHIDs;
 
+  public function withIDs(array $ids) {
+    $this->ids = $ids;
+    return $this;
+  }
+
   public function withTokenPHIDs(array $token_phids) {
     $this->tokenPHIDs = $token_phids;
     return $this;
@@ -29,6 +35,13 @@
   protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {
     $where = parent::buildWhereClauseParts($conn);
 
+    if ($this->ids !== null) {
+      $where[] = qsprintf(
+        $conn,
+        'id IN (%Ld)',
+        $this->ids);
+    }
+
     if ($this->authorPHIDs !== null) {
       $where[] = qsprintf(
         $conn,