Dundas was appointed Keeper of the Signet for Scotland and elected MP for Midlothian (Edinburghshire) in 1801. He remained silent in parliament until his speeches of 1805 and 1806 in defence of his father, who was then being impeached. His first real test came in negotiating to be left in charge of Scotland by a hostile 'ministry of all the talents'. He got nowhere, but won the respect of his own side, and the problem vanished with the ministry's collapse. He was rewarded with the presidency of the Board of Control for India by the Duke of Portland in 1807.
