The correct response is: They served as scouts and spies for the Union.
Many formerly enslaved African Americans took the opportunity to assist Union forces by providing valuable information, acting as scouts, and serving in various capacities to support the Union Army's efforts during the Civil War.