The "Kai Po Che" helmer had filed a suit in the High Court seeking credit as a joint writer along with Pubali Chaudhary.
Bhagat, who faced the similar issue during Rajkumar Hirani's "3 Idiots" as the comedy drama was loosely adapted from his novel "Five Point Someone", said the writers must get credit.
"Writers must get credit. Glad @Abhishekapoor got justice.
He backed me once when few others did. #kaipoche," Bhagat posted on Twitter.
An elated Kapoor wrote, "Thanks for the support bro."
The duo worked together in 2013 buddy drama "Kai Po Che" based on the author's novel "The 3 Mistakes of My Life".
The filmmaker is currently busy with his next directorial venture "Fitoor", starring Katrina Kaif and Aditya Roy Kapur in the lead.