[3] Early in his legal career he came to the attention of Count Giacinto Fedele Avet, King Charles Albert’s Minister of Justice, and he was appointed private secretary to the ministry on 31 August 1841.
[3][1] In 1851 Cavour, being part of the ministry presided over by D'Azeglio, sent him to head the tax office of Nice where the quality of his work attracted the attention of Napoleon III.
In March 1854, Cavour tried to make him Minister of Justice in his government, but Vigliani wished to continue practicing law, and instead he was appointed Attorney General of at the Court of Appeal of Genoa.
[3][2] After Vigliani had served as prefect of Naples from October 1864 to March 1866, a decree of 4 June 1866 appointed him first president of the Court of Cassation of Florence, a position he held until his retirement, at the age of seventy-five.
In his first term of office he promulgated the naval penal code, and with his measured approach to business managed to calm the political attacks against the ministry by the parliamentary opposition and even by some judges, due to the conduct of his predecessor Michele Pironti, whose rigid and conservative views had alienated many.
He also promoted the compilation of the new commercial code[3] Vigliani also introduced guarantees for the security of public officials, preventing their being replaced when a different government took office.
In 1875 he also secured the passage of a law establishing two temporary sections of the Court of Cassation in Rome, without suppressing those of Turin, Florence, Naples and Palermo.
The matter was not finally resolved under Vigliani, but the negotiations between him and Don Bosco on behalf of the Vatican were marked by a civil and conciliatory tone that was a notable change from previous discussions.