Pep Guardiola will return to the Nou Camp in the Champions League group stage after his new club Manchester City were drawn against his former Barcelona team on Thursday.
The two sides were drawn in Group C alongside Borussia Moenchengladbach and former European champions Celtic in one of the toughest of the eight sections.
Spanish coach Guardiola, who won the Champions League twice with Barca, faced the Catalans when he was in charge of Bayern Munich two seasons ago and suffered a 5-3 defeat in the semi-finals.
It was one of three successive semi-final eliminations that Guardiola suffered in as many seasons at Bayern.
Bayern, now under triple Champions League winner Carlo Ancelotti, will have a quick chance to avenge last season's semi-final defeat by Atletico Madrid after they were paired together in Group D along with PSV Eindhoven and group stage debutants Rostov.
Holders and 11-times winners Real Madrid will have a tough pair of matches against Borussia Dortmund in Group F although both teams should progress from a section that also contains Sporting Lisbon and Legia Warsaw.
The Polish team are back in the group stage after a 20-year absence.
English Premier League winners Leicester City, the only other newcomers among the 32 teams, will face Porto, Club Bruges and FC Copenhagen in Group G.
Porto are taking part in the group stage for the 21st time, a record they share with Real and Barca. The double champions from Portugal have won only three of their last 16 ties against English teams in the competition.
Paris St Germain and Arsenal, who are attempting to reach the round of 16 for the 17th time in a row, were drawn in Group A alongside dark horses Basel and rank Bulgarian outsiders Ludogorets.
Juventus, Serie A winners for the last five seasons, face Sevilla, Olympique Lyonnais and Dinamo Zagreb in Group H.
For the third season running Serie A has only two teams in the group stage. The other side, Napoli, will meet Benfica, Besiktas and Dynamo Kiev in Group B.
Group E is arguably the most evenly-balanced with CSKA Moscow, Bayer Leverkusen, Tottenham Hotspur and Monaco.