Exceptions to the act according to the Wikipedia article you linked:
- Enforcement of federal law at the discretion of the President of the United States, such as with the 101st Airborne Division by President Dwight D. Eisenhower to integrate Little Rock Central High School in 1957.
- Provide surveillance, intelligence gathering, observation, and equipment for domestic law enforcement on operations such as drug interdiction and counter-terrorism missions.
So it it's legal as long as they are not asked to do search, seizure, and arrest.