We describe a technique for measuring focus errors in a cryogenic, wide-field, near-infrared space telescope. The measurements are made with a collimator looking through a large vacuum window, with a reflective cold filter to reduce the background thermal infrared loading on the detectors and optics. The vacuum window and cold filter introduce a wavefront error that we characterize using an autocollimating microscope. For the 200 mm diameter aperture f/3 space telescope SPHEREx, we achieve a focus position measurement with a ∼15µm systematic and a ∼5µm statistical error.