It is the duty of the attorney general and reporter, upon the request of the department, to advise the department at all times of its legal rights, duties, powers and obligations, in matters concerning this chapter, to appear in any proceedings in the courts or otherwise, concerning the department and to do all things proper to carry out the duties in this chapter imposed upon the attorney general and reporter.