Making his first start as a college quarterback, Foles was patient and precise in directing the Wildcats' spread offense, which carved up Oregon State's inexperienced secondary.
James Rodgers had eight catches for 119 yards for the Beavers. Jacquizz Rodgers ran for 85 yards and two touchdowns and also caught 13 passes for 70 yards. Sean Canfield was 31-of-47 for 303 yards, two touchdowns and two interceptions. He was sacked five times.
The Beavers (2-2) fell behind 28-17 in the third quarter and had three chances for a winning drive. Starting at their own 3 with just over three minutes left in the game, the Beavers completed three passes, but Canfield was picked off by Devin Ross.
Arizona (3-1) went three-and-out, but punter Keeyan Crier pinned Oregon State to its 2, and the Beaver offensive line wilted. On the first play, Canfield was dumped in the end zone for a safety. The Beavers recovered the on-side kick, but Canfield was sacked twice more to end the game.
The Beavers are 109th in the country in passing defense.
Foles, the 6-foot-5 sophomore with a big arm, completed 25 of 34 passes and ran an efficient and effective offense even though Grigsby was lost to a shoulder injury after just one carry and backup tailback Keolo Antolin was slowed by a leg injury. In their absence, redshirt freshman Greg Nwoko had 76 receiving and 44 yards rushing.
Foles, who replaced Matt Scott as the starter this week, started out strong, coolly completing five of his first seven passes on deliberate 15-play, 71-yard scoring drive capped with a 2-yard strike to Delashaun Dean.
The Beavers tied up the game with an 11-yard touchdown pass from Canfield to Damola Adeniji and led 17-14 lead at halftime.
The Wildcats took the lead in the third after Trevin Wade intercepted Canfield's pass, setting up Foles' 1-yard TD run. Foles also connected with Nwoko for a 52-yard reception and found Juron Crier for a 3-yard touchdown pass four plays later.
Jacquizz Rodgers scored on a three-yard run and James Rodgers ran in the two-point conversion to cut the lead to 28-25.
But starting the drive at the Beaver 45, Foles engineered a five-play drive and found Terrell Turner wide open in the end zone.
Canfield threw a 13-yard touchdown pass to Aaron Nichols that got the Beavers within 35-32.
Four of the last six meeting between the two teams have been decided by seven points or less.