“The Sentinel” is episode twenty of season five of Stargate SG-1.
In the past, the SGC has run across NID teams stealing technology and alienating Earth’s allies and friends, until O’Neill infiltrated and stopped them in “Shades of Grey”.
SG-9 are on a mission to a planet visited by an NID team, and they’re overdue. When contact is made with them, they are under attack and, by the sounds of it, wiped out by Goa’uld forces. The NID team was after a planetary defence system called the Sentinel.
With the Sentinel presumably non-functional, the world is under threat from the Goa’uld, so O’Neill has to deal with the convicted NID team leader, to find out what the NID did to it. They have to take some of the NID with them on the mission. Friction ensues.