Taroenamihardja became Indonesia's first attorney general after Indonesia's independence in 1945. President Sukarno established him as the attorney general on 19 August 1945, two days after independence. Before his resignation on 24 October of the same year, Taroenamiharja released on declaration and one announcement, both on 1 October. The declaration, pronounced together with Minister of Justice Soepomo and Minister of Home Affairs Wiranata Koesoema, outlined the function of the attorney general's office, while the instruction, directed at the Indonesian National Police, ordered them to take extra measures to ensure the safety of the republic from Dutch troops during the Indonesian National Revolution.