The purpose of this paper is to emphasise the importance of recognising the legal framework within which a cooperative compliance programme is to operate. This is done through the example of the Swedish cooperative compliance model, fordjupad dialog ("in-depth dialogue"), which has been described as somewhat of a failure by representatives from both academia and business. In this paper, the author points to certain legal issues that may explain why the Swedish cooperative compliance programme has not been a success. The focus is the principle of legality, laid down in Swedish constitutional law, which requires a legal basis in the law for public agency activities. The lack of legal basis has been a central part of the criticism concerning fordjupad dialog. The Swedish Tax Agency argues that there is a legal basis for fordjupad dialog, through the so-called service obligation provision in Section 6 of the Administrative Procedure Act of 2017. The author argues that, on the contrary, fordjupad dialog does not constitute a form of service under this Act. This conclusion is based on, inter alia, an analysis of the scope of the term "service". Therefore, fordjupad dialog lacks legal basis. Since it has not been possible to find another provision laid down in the law that may constitute such a legal basis, it is the author's conclusion that the constitutional principle of legality has not been met. Thus, the criticism concerning the fact that fordjupad dialog lacks legal basis still stands.