Lorenzo Colombo scored on his full debut in the absence of Zlatan Ibrahimovic to help Milan overcome Bodo/Glimt 3-2 in the Europa League third qualifying round.
The teenage forward was brought into the side in place of Ibrahimovic, who tested positive for coronavirus ahead of Thursday's one-legged tie at San Siro.
Milan were given a scare as Kasper Junker fired the Norwegian visitors ahead after 15 minutes but it took just 106 seconds for Hakan Calhanoglu to equalise from long range.
Colombo put Milan in front and Calhanoglu appeared to give the hosts breathing space, only for Jens Hauge to pull another back, but the Italian giants held on to set up a play-off with Rio Ave.
Bodo/Glimt entered the game unbeaten in 20 matches and took the lead through Junker's crisp finish from eight yards following some good play from Hauge out wide.
Calhanoglu promptly hit back for the home side with a powerful drive from range after being allowed to spin and drive forward 30 yards from goal.
A moment to remember followed for Colombo as the academy product rounded off a flowing team move after Calhanoglu flicked the ball into his path at the back post.
Not content with a goal and an assist, Calhanoglu smashed in a third for Milan with a low volley from outside the box at the end of a well-worked corner routine.
Hauge beat Gianluigi Donnarumma from 25 yards with a stunning effort to give Bodo/Glimt hope and Kjetil Knutsen's charges nearly took the game to extra time late on.
After Milan substitute Rade Krunic was denied by covering defender Brede Moe on the line, Ulrik Saltnes flashed a shot over from a good position at the other end in one final scare for the hosts.
What does it mean? Milan one step closer to group stage
For a club boasting seven European titles – only Real Madrid (13) have won more – the Europa League feels like a bit of a comedown for Milan.
Pioli's men are taking the competition seriously, though, and now have just one more hurdle to overcome if they are to reach the group stage.
Bodo/Glimt pushed them all the way, but Milan were the better side overall – as evidenced by their 58-per-cent possession and eight shots on target – and an even tougher test now awaits against Portuguese side Rio Ave in the play-offs.
Colombo takes his chance
The full debutant was brought into the side as Pioli's only change from last week's win over Shamrock Rovers and made his mark with his close-range finish to put Milan ahead.
In doing so, Colombo – who managed two shots on target from his 16 touches of the ball – became his side's youngest goalscorer in all competitions since M'Baye Niang against Reggina in December 2012.
Milan caught out at the back
Hauge's strike for Bodo/Glimt was impressive but Milan's players perhaps could have done more to close him down. The first goal was definitely avoidable, with the same player getting away from Davide Calabria and Franck Kessie with ease.
Calabria made up for his defensive deficiencies with some positive attacking play, however, boasting a better passing accuracy (92 per cent) in the opposition half than any Milan starter.
Before next week's showdown with Rio Ave, Milan first travel to Crotone in their next Serie A outing on Sunday, the same day Bodo/Glimt host Valerenga in the Eliteserien.