France striker Antoine Griezmann had a goal ruled out by a video assistant referee for offside.
And Spain's second goal, scored by Gerard Deulofeu, was awarded by the video official after an assistant referee wrongly flagged for offside.
David Silva opened the scoring for Spain with a penalty after Laurent Koscielny fouled Deulofeu.
Griezmann had earlier had a headed goal ruled out when referee Felix Zwayer reversed his initial decision after receiving a message in his earpiece from the video assistant referee, who was sat in a truck outside the Stade de France.
Replays showed Layvin Kurzawa was narrowly offside when he headed the ball to Griezmann, with the decision to overturn the goal made in about 30 seconds.
Deulofeu's goal - from a Jordi Alba cross - was awarded after a conversation between the referee and the video assistant that lasted about a minute.
Video assistant technology was first used in September, in France's 3-1 friendly win in Italy.
It was then used at the Fifa Club World Cup, and the Football Association wants to use it in next season's FA Cup from the third round onwards.
Fifa president Gianni Infantino would like the system to be used at the World Cup in Russia next year.
Match ends, France 0, Spain 2.
Second Half ends, France 0, Spain 2.
Sergio Busquets (Spain) wins a free kick in the defensive half.
Foul by Olivier Giroud (France).
Foul by Gerard Deulofeu (Spain).
Laurent Koscielny (France) wins a free kick in the defensive half.
Foul by Ander Herrera (Spain).
Tiemoué Bakayoko (France) wins a free kick in the defensive half.
Offside, France. Olivier Giroud tries a through ball, but Antoine Griezmann is caught offside.
Offside, France. Antoine Griezmann tries a through ball, but Layvin Kurzawa is caught offside.
Offside, Spain. Gerard Piqué tries a through ball, but Iago Aspas is caught offside.
Attempt missed. Antoine Griezmann (France) header from very close range is high and wide to the left. Assisted by Ousmane Dembélé with a cross.
Substitution, Spain. Nacho replaces Jordi Alba.
Daniel Carvajal (Spain) wins a free kick in the defensive half.
Foul by Layvin Kurzawa (France).
Substitution, Spain. Iago Aspas replaces Álvaro Morata.
Attempt missed. Ousmane Dembélé (France) left footed shot from the right side of the box is too high. Assisted by Christophe Jallet.
Foul by Thiago Alcántara (Spain).
Antoine Griezmann (France) wins a free kick in the attacking half.
Offside, Spain. Gerard Deulofeu tries a through ball, but David Silva is caught offside.
Substitution, France. Thomas Lemar replaces Corentin Tolisso.
Substitution, France. Ousmane Dembélé replaces Kevin Gameiro.
Foul by Sergio Ramos (Spain).
Tiemoué Bakayoko (France) wins a free kick on the right wing.
Goal!  France 0, Spain 2. Gerard Deulofeu (Spain) right footed shot from the centre of the box to the bottom right corner. Assisted by Jordi Alba.
Delay over. They are ready to continue.
Substitution, Spain. Ander Herrera replaces Koke.
Delay in match Laurent Koscielny (France) because of an injury.
Attempt missed. Tiemoué Bakayoko (France) header from the centre of the box is too high. Assisted by Antoine Griezmann with a cross following a corner.
Corner,  France. Conceded by Sergio Ramos.
Attempt blocked. Kevin Gameiro (France) right footed shot from outside the box is blocked.
Corner,  France. Conceded by Koke.
Attempt blocked. Samuel Umtiti (France) left footed shot from the right side of the box is blocked.
Foul by Gerard Piqué (Spain).
Olivier Giroud (France) wins a free kick in the attacking half.
Corner,  France. Conceded by Jordi Alba.
Hand ball by Sergio Busquets (Spain).
Goal!  France 0, Spain 1. David Silva (Spain) converts the penalty with a left footed shot to the bottom right corner.
Penalty Spain. Gerard Deulofeu draws a foul in the penalty area.
Penalty conceded by Laurent Koscielny (France) after a foul in the penalty area.
Video technology was used to correct two wrong decisions as Spain beat France in a friendly in Paris.