From what I understand, they were bugged after the fact.
There is still a bit of a jump (how did they know who to wiretap? It wasn't really reported, afaik), but looking at the biographies of involved parties, they're the sort of people who would have been prime suspects anyway, so choosing to bug them was probably not an improbable decision to take.
There is still a bit of a jump (how did they know who to wiretap? It wasn't really reported, afaik), but looking at the biographies of involved parties, they're the sort of people who would have been prime suspects anyway, so choosing to bug them was probably not an improbable decision to take.