Code of Criminal Procedure lays down the granting of sanction in 2 cases. Sanction to Prosecute (Sec.132) and Sanction to take Cognizance (Sec.196 and 197). Sanction to prosecute is taken before the filing of FIR or the complaint whereas sanction to take cognizance is taken pre-cognizance and post-investigation stage.
Section132 says any person who is a member or officer of armed forces and from the State Government in any other case will not be prosecuted without the sanction of Central or the State government.
Section 196 and 197 of the Code states that for the prosecution of offenses against the state and of Judges and Public servants, sanction from Central or the State government is mandatory.
sanction of the Central Government or State Government, as the case may be, for prosecution for offenses against the state and of Judges and Public servants respectively.
There have been several cases to decide what includes central and state government and who has the authority to give sanctions. The state government can include the governor and the council of state ministers as well as the authorities who have been delegated the power. In the case of Yashwant Trimbak vs The State of Madhya Pradesh and Anr., the court held that governor has the authority to grant sanction and any person on the explicit orders of the governor can also grant sanction.
Refer : R. S. Nayak vs. A. R. Antulay
M. Karunanidhi vs. Union of India