A leg injury meant Osaka missed last season's clay-court swing, and her last individual tournament on the surface was at Roland Garros in 2019.
Badosa, a former French Open junior champion, is the lowest-ranked player to beat Barty since September 2019.
The top-ranked Barty rallied from a big third-set deficit and overcame a match point to win her opening match against qualifier Kristina Kucova, 6-3, 4-6, 7-5.
Dubai Tennis Championships: Elina Svitolina crashes out against Svetlana Kuznetsova; 'fiery' Coco Gauff reaches last 16
Kuznetsova rallied back from a set and an early break down to knock out the two-time champion and record her 21st match-win in Dubai
Adelaide International: Iga Swiatek overcomes Jil Teichmann challenge in straight sets to reach final
Swiatek burst onto the scene last year when she won at Roland Garros, beating then world number six Sofia Kenin in the final.
Adelaide International: Coco Gauff beats Shelby Rogers to reach semi-finals; Teichmann defeats Sevastova to progress
Coco Gauff will play either Belinda Bencic or Storm Sanders in the semis, and Jil Teichmann will play the winner of the Iga Swiatek vs Danielle Collins match.
Coco Gauff beat sixth-seeded Petra Martic 5-7, 6-3, 6-4 to advance to the quarter-finals of the hard-court tournament at Memorial Drive.
Top-ranked Ash Barty, who lost in the Australian Open quarterfinals, is the Adelaide defending champion.
The 23-year-old's zen-like mentality and increased gravitas on and off the court have elevated her alongside Serena Williams to being the one of the most recognisable female athletes on the planet.
Australian Open 2021: Sofia Kenin's title defence ends early; Rafael Nadal, Stefanos Tsitsipas through to third round
Delivering 10 aces, Kanepi powered her way past the No. 4-seeded Kenin, overwhelming the 2020 champion 6-3, 6-2 in just 64 minutes
Australian Open 2021: 'Feel like I played better', teenager Coco Gauff unruffled by second-round defeat
Gauff showed plenty of promise but fell to fifth seed Elina Svitolina 6-4, 6-3 in a free-wheeling second-round contest on Rod Laver Arena.
Australian Open 2021: Teenager Coco Gauff looks to embrace pressure and upset Elina Svitolina in second round
16-year-old Coco Gauff showed the form that fuelled her dazzling run last year at Melbourne Park during a crushing 6-3, 6-2 victory over Swiss Jil Teichmann
Australian Open 2021: Rafael Nadal, Daniil Medvedev through in straight sets, Sofia Kenin struggles to win; Victoria Azarenka crashes out
Nadal finished off a 6-3, 6-4, 6-1 win in just under two hours in his first competitive match in months
Abu Dhabi Women’s Tennis Open: World No 292 Anastasia Gasanova stuns former top-ranked Karolina Pliskova
The 21-year-old Gasanova won 6-2, 6-4 to reach the round of 16 and record her first ever victory over a player in the top 100.
Ostrava Open: Aryna Sabalenka back from brink to defeat Coco Gauff in thriller; second-seed Karolina Pliskova suffers upset
The big-hitting Sabalenka, the world number 12, took two hours and 13 minutes to beat 55th-ranked Gauff 1-6, 7-5, 7-6 (7/2).
Italian Open 2020: After US Open run, Shapovalov piling up wins in Rome, Azarenka double bagels Kenin
After spending more than 22 hours on court over the previous two weeks at the US Open, where he reached the quarterfinals in both singles and doubles, Shapovalov is still going strong after crossing the Atlantic.
Italian Open 2020: Teenager Lorenzo Musetti stuns Stan Wawrinka; Garbine Muguruza beats Sloane Stephens in straight sets
Stan Wawrinka, the 10th seed in Rome, lost 6-0, 7-6 (7/2) against a player ranked 249th in the world.
Coco Gauff's hopes of launching another deep run at a Grand Slam ended in the first round at the US Open, with the US teenager succumbing in three sets to Latvia's Anastasija Sevastova.
US Open 2020 Women's Singles preview: COVID-19 withdrawals turn already unpredictable category into free-for-all
Ahead of tennis' return to the big stage, Firstpost takes a look at the US Open Women's Singles draw and attempts to determine the potential outcome of all four quarters
US Open 2020: Coco Gauff, 16, who lost her learner's permit but found voice in fight for racial justice
Coco Gauff has a tough assignment in her first-round match at the US Open, facing 31st-seeded Anastasija Sevastova, a 30-year-old from Latvia who was a semifinalist in New York two years ago.