Zechariah 3:1

וַיַּרְאֵנִי אֶת יְהוֹשֻׁעַ הַכֹּהֵן הַגָּדוֹל עֹמֵד לִפְנֵי מַלְאַךְ ה’ וְהַשָּׂטָן עֹמֵד עַל יְמִינוֹ לְשִׂטְנוֹ

He showed me Joshua the High Priest standing before the angel of G-d, and the prosecutor standing on his right side to accuse him.

Clearly Joshua the High Priest wasn’t doing something right, but what exactly was the complaint against him? Rashi cites the Talmud in Sanhedrin (93a) that Joshua’s own sons married idolatrous women from foreign lands, a fact that is revealed to us in the tenth chapter of the Book of Ezra.