Cal. Rev. & Tax. Code § 19547
In a matter involving tax administration under this part, a return or return information shall be open to inspection by the Attorney General or other legal representatives of the state, if any of the following apply:
(c) The return or return information relates or may relate to a transactional relationship between a person who is a party to the proceeding and the taxpayer, which affects or may affect, the resolution of an issue in the proceeding or investigation.
In addition, the Attorney General may inspect any report or return required under this part when required in the enforcement of any public or charitable trust or in compelling adherence to any charitable purposes for which any nonprofit corporation is formed.