The American Federation of Teachers, a union representing more than 1.8 million educators, had sued to keep members of Mr. Musk’s government efficiency team out of the Education Department’s systems.

The American Federation of Teachers, a union representing more than 1.8 million educators, had sued to keep members of Mr. Musk’s government efficiency team out of the Education Department’s systems.