It all depends on the form of your company and its turnover.
For a general partnership (SNC): appointing a statutory auditor is in principle optional and is done by a majority of the partners (art. 12). But it becomes mandatory when the turnover at the close of the financial year exceeds fifty million dirhams excluding tax (art. 12). Even below this threshold, a partner may request such an appointment from the president of the court ruling in summary proceedings (art. 12).
The rules on appointment, incompatibilities, powers, obligations, liability, removal, and remuneration of auditors are those of Law 17-95 on public limited companies, adapted to the SNC (art. 13).
For a partnership limited by shares, it is the ordinary general meeting of shareholders that appoints one or more statutory auditors, with the rules of article 13 applying (art. 34).
Good to know: for the SNC, the absence or presence of an auditor affects the information provided to the partners, since their report is, where applicable, sent fifteen days before the meeting to approve the accounts (art. 10).
This is general legal information, not legal advice. For advice on your specific situation, consult a lawyer admitted to the Bar in Morocco.