Just after checkin, on the boarding pass.
In one event I was in Uniform (just arrived in as crew but next leg as Pax) so the screening station let me straight through but the gate staff saw the SSSS and saw it was not stamped as "checked" at the screening station so they called TSA to the gate to get me to submit to the whole ten yards, at the gate with all pax looking on. Won't fall into that trap again!