Simplest is to:
But this might be slow because of the in-memory list of 10000 objects.
Alternative: Use OQL to retrieve all duplicate ids. Something like:
from module.Program as p
group by p.ProgramID
having count(p.ProgramID) > 1
select p.ProgramID
Second alternative is a microflow in which you retrieve Program ordered by ProgramID, looping over it, checking if p.ProgramID is the same as the previous.