Brazil has been placed with Iraq, South Africa and Denmark in Group A of men's soccer at the Summer Olympics as it chases its first gold medal in August.
Reigning champion Mexico, meanwhile, will have to deal with London 2012 bronze medal winners South Korea, Germany and Fiji in Group C.
MORE: U.S. women's path set | Boycott not a good idea | Rio Games schedule
Brazil's men have won three silver medals, in 1984, 1988 and 2012, and took home the bronze medal in 1996 and 2008, but have yet to win gold.