In brief: An AI or automation tool does not change the accounting rules. Each entry keeps its origin, its allocation and the reference of its supporting document (Art. 1 of Law 9-88). Supporting documents stay on file for ten years (Art. 22). Personal data may leave for a service hosted outside Morocco. Law 09-08 then governs the transfer (Art. 43 and 44). The controls to plan: tool inventory, human approval, retention, review of settings, logging, access rights. The statutory auditor examines this set-up, but does not approve the tool.
Your team reconciles the bank with an automated tool. An accountant asks an AI assistant to draft an analysis note or to propose a provision. Another pastes an extract of the customer ledger into an online service to save an hour. These gains are real, but they shift the risk. The error no longer comes from a single keying mistake: it comes from a rule applied to thousands of lines.
Moroccan texts do not target any tool. They set what accounts must prove, who answers for them and how to protect people’s data. These rules apply to a spreadsheet, accounting software or an AI assistant.
What the texts require, whatever the tool
Law 9-88 requires recording transactions “chronologically, transaction by transaction and day by day” (Art. 1). Each record states “the origin, content and allocation of the transaction and the references of the supporting document behind it”. An entry proposed by a tool follows the same rule as an entry keyed by hand.
The same law sets other obligations that automation touches directly:
- an inventory at least once per financial year, at its end (Art. 5);
- financial statements that give a true and fair view (Art. 11);
- valuation methods that stay the same from one financial year to the next (Art. 13); the additional information statement (ETIC) describes and justifies any change;
- the necessary provisions, even when there is no profit (Art. 16);
- retention of accounting documents and supporting documents for ten years (Art. 22);
- documents kept “without blanks or alterations of any kind” (Art. 22).
Above 10 million DH of annual turnover, the company also prepares an accounting organisation manual (Art. 4).
Under the CGNC, accounts with evidential value must meet the requirements of regularity. They must also make it possible “to check the accuracy of the data and of the processing procedures”. Each supporting document bears a date and the reference of its entry, then stays filed and kept. A correction of an error leaves the original wrong entry legible.
For computer processing, the CGNC sets three principles. Chronological order rules out any insertion between entries. Irreversibility rules out any later deletion or addition of an entry. Durability provides the retention conditions the law prescribes.
The system must also give access to the documentation on the analysis, programming and processing procedures. Its periodic statements bear a number and a date. Any data received from another processing system rests on a supporting document with evidential value. This last rule applies to the tool that reads an invoice or a statement and proposes the entry.
| Requirement | Text | What the tool changes | Control to plan |
|---|---|---|---|
| Referenced supporting document | Art. 1 of Law 9-88; CGNC, ch. III B and G-4 | The tool produces an entry from an incomplete document, or from no document | Rejection of any entry without a link to its document |
| Chronological order and irreversibility | CGNC, ch. III G-2; Art. 22 of Law 9-88 | A tool rewrites or deletes lines after the event | Locking of approved entries; correction by a legible entry |
| Control of processing | CGNC, ch. III A and G-2 | A matching or calculation rule that nobody reads | Documentation of settings, open to inspection |
| Consistency of methods | Art. 13 of Law 9-88 | A new setting changes a valuation method without a decision | Review of settings before each year-end close |
| Retention | Art. 22 of Law 9-88; CGNC, ch. III D-1 and G-2 | Data stored with a provider whose contract may end | Regular export in a format readable without the tool |
| Personal data | Art. 3, 14, 15 and 43 of Law 09-08 | Employee or customer data leave for a service hosted abroad | Written rule on permitted data; declaration up to date |
Six risks specific to automation
An entry without a supporting document
An AI assistant can propose a complete entry from a simple description. The entry looks clean (accounts, amount, narrative), but nothing guarantees that a document lies behind it. An invoice-reading tool can also get the date, the amount or the supplier wrong. The entry then meets neither Art. 1 of Law 9-88 nor the CGNC’s requirement of a document with evidential value. The rule fits in one line: no attached document, no approval.
A provision raises the same problem: it remains an estimate for which management answers. The CGNC’s prudence principle requires taking into account the uncertainties that may increase the expenses of the year. They stem from facts known at the year end: a customer in arrears, a dispute, stock that no longer moves. A figure produced by a tool, without documented analysis, shows none of these facts.
An error repeated at scale
A wrong manual entry affects one line. A wrong automation rule affects every line it processes, every day, without warning. The SME Audit Standards Manual covers this case: highly automated processing, with little or no manual intervention. For some assertions, substantive procedures alone are then not enough. You have to check the rule itself, not just a few entries.
The audit trail lost
The audit trail links each figure in the financial statements to its entries, then to its documents. A tool breaks it if it changes lines without a trace, groups transactions without detail or overwrites a source file. The CGNC rules out any insertion between entries and any later deletion. A correction leaves the wrong entry legible. A tool that “cleans” data after approval goes against these three rules.
Data sent outside Morocco
An online AI service may host its servers outside Morocco. An accountant pastes into it a payroll statement, a customer list or an exchange with an employee. The accountant then transmits these data to the provider. If the data concern natural persons, Law 09-08 applies.
Data that are not personal raise another question, that of confidentiality. Prices, margins, contracts, sale projects: the company decides itself what may leave. The service’s terms of use say what the provider does with the data it receives. Read them before allowing the tool.
Dependence on a provider
A hosted tool may change version, alter its rules or stop its service. Your 2026 accounting documents and supporting documents must still remain available for ten years. The CGNC requires access to the documentation on the analysis, programming and processing procedures. If only the provider knows how its tool matches or classifies, the company cannot give that access.
Segregation of duties bypassed
In a sound organisation, the person who records does not approve, and the person who pays does not reconcile. A tool connected to several functions can combine these roles under a single account. An employee can then create a supplier, record its invoice and prepare the transfer. The CGNC expects reliable accounting control “contributing to the prevention of errors and fraud”. The embezzlement schemes and warning signs in SMEs show what this combination of roles allows.
Personal data: what Law 09-08 says
Law 09-08 defines personal data as any information concerning an identified or identifiable natural person. The medium does not matter. Processing covers, among other things, consultation, use and disclosure by transmission. A payroll file, a list of individual customers or a named expense claim fall within this scope. Handing them to an AI tool is therefore processing.
Five rules concern the finance function directly.
- Purpose and proportionality. Data serve specified purposes and remain “adequate, relevant and not excessive” (Art. 3). Sending a full named file when the analysis needs only totals goes beyond this.
- Declaration or authorisation. The controller sends a declaration to the National Commission before carrying out automated processing (Art. 12 and 14). Some processing requires prior authorisation (Art. 12). This is the case for use for purposes other than those of collection. It is also the case for data that include the national identity card number.
- Updating. The declaration states the planned transfers to foreign States and the use of third-party processors (Art. 15). Any change goes to the National Commission “without delay”. The arrival of a tool hosted abroad may therefore require an update.
- Processor. The provider that processes data on your behalf is a processor (Art. 1). Choose it for its security guarantees and make sure it complies with these measures (Art. 23). A written contract provides that it acts only on your instructions.
- Transfer abroad. A transfer to a foreign State requires that State to ensure an adequate level of protection (Art. 43). The National Commission draws up the list of these States. Failing that, Art. 44 provides exemptions, including the express consent of the person and the performance of a contract with them. The National Commission may also give an express and reasoned authorisation.
A last rule covers the automated analysis of individuals. No decision with legal effects may rest solely on automated processing of the person’s profile (Art. 11). The exception covers decisions within a contract, if the person could put forward their views. A measure concerning an employee, based solely on a tool’s score, falls under this rule.
The guide to Law 09-08 and the CNDP covers the whole framework. The formalities appear in the practical guide to CNDP declarations and authorisations. The article on international transfers of personal data sets out these rules country by country.
The controls to put in place
Keep an inventory of tools
List each tool the finance team uses: its task, its users, the data it receives, where it hosts them. Include AI assistants that an employee has opened individually. A tool missing from the list escapes every other control.
Decide who approves
No entry proposed by a tool enters the accounts without approval by an identified person. That person, who is not the one who launched the processing, checks the document, the allocation and the amount. For an estimate, provisions included, approval rests with a manager who writes down the reasoning.
Decide what to keep
Keep the document, the entry, the record of approval and the statements produced, numbered and dated. Also keep the version of the settings in force and, for an AI assistant, the prompt that produced the proposal. These items link the entry to its origin. Plan a regular export, readable without the tool, to cover the ten years.
Review the settings
A matching rule, an alert threshold or an account mapping table are accounting choices. A manager approves them before go-live, then reviews them at each change and before each year-end close. If a change affects a valuation method, the additional information statement describes and justifies it (Art. 13 of Law 9-88).
Keep a log
The tool’s log records who did what, when and on which lines. It makes it possible to trace an entry that was changed or deleted. Without it, nobody can check the chronological order and irreversibility the CGNC requires. Check that the tool’s users cannot erase this log.
Limit access rights
Assign rights by function: recording, approval, payment, settings. Review them at each departure and each change of role. A shared account, or a technical account without a holder, makes it impossible to know who acted.
Write the rule on data
State which data may go into a hosted tool, and which never may. Remove names, identity card numbers and contact details when the analysis does not need them. Check the declaration with the National Commission and the contract with the provider.
Above 10 million DH of turnover, these rules belong in the accounting organisation manual (Art. 4 of Law 9-88). The CGNC also provides for a procedures manual where understanding the system and carrying out controls require one. The accounting procedures manual therefore holds these rules. They complement the key controls by cycle: sales, purchasing, cash, payroll.
Example: a bank reconciliation that matches wrongly (company X, SA, assumption)
Company X reconciles its bank statements with an automated tool. The tool matches each receipt with the first open invoice of the same amount. It checks neither the invoice reference nor the payer’s name.
On 28/11/2026, company X receives 84,000 DH from customer B, in payment of its November invoice. The tool matches it with a July invoice of customer A, for an identical amount of 84,000 DH. Customer B’s invoice stays open.
The bank reconciliation shows no difference: the statement balance and the book balance agree. The error lies in the aged receivables balance: the July receivable appears as paid, the November one as recent. At the year end, the review of provisions leaves out customer A’s receivable. Yet this customer has paid nothing since July. The necessary provision within the meaning of Art. 16 of Law 9-88 may be missing.
Several controls would have stopped the error:
- a matching rule on the invoice reference or the payer’s name, not on the amount alone;
- an exceptions queue for any receipt whose payer differs from the invoice’s customer;
- human approval of proposed matches, at least above a threshold set by management;
- review of the aged receivables balance by someone other than the person who reconciles;
- a balance confirmation request to customer A at the year end.
The statutory auditor can detect the error through this last route. The auditor keeps control of confirmation requests, and the replies come back directly to the auditor. Customer A would reply that the July invoice is still owed. The company does better to find the error first.
What the statutory auditor does, and does not do
Appointing a statutory auditor is mandatory in every SA (Art. 159 of Law 17-95). In an SARL, it is also mandatory above 50 million DH of turnover excluding taxes at the year end (Art. 80 of Law 5-96). The guide to statutory audit in Morocco details the engagement and the appointment.
What the auditor examines
The SME Audit Standards Manual requires the auditor to understand internal control in every engagement. This internal control covers “the accounting and other financial information systems that are used”. Your automation and AI tools form part of it as soon as they produce or change accounting data.
Inquiries of management are not enough, on their own, to assess this set-up. The manual cites the introduction of new IT applications among the reasons to observe controls in operation. Faced with highly automated processing, the auditor cannot rely on substantive procedures alone for some assertions. The auditor then tests the tool’s controls, or the human controls around it. For a provision proposed by a tool, the auditor checks that the estimate is reasonable, as for any other estimate.
In the SA, the law gives the auditor specific means. The auditor carries out, at any time of the year, the checks and controls deemed appropriate (Art. 167 of Law 17-95). The auditor obtains on site the relevant documents, in particular contracts, books and accounting records. The auditor may call on experts or staff of the auditor’s choosing and gives their names to the company.
What the auditor reports
The auditor communicates in writing the significant deficiencies in internal control to those charged with governance. In the SA, the auditor reports to the board of directors the irregularities and inaccuracies discovered (Art. 169). The auditor also points out the items in the financial statements that, in the auditor’s view, call for changes. A wrong automatic match, an entry without a document or an erasable log may appear in these communications.
Finally, the auditor certifies that the financial statements are regular and sincere and give a true and fair view (Art. 175). The auditor may also qualify the certification or refuse it.
What the auditor does not do
The auditor does not approve a tool and does not choose your settings. The permanent engagement operates “to the exclusion of any interference in management” (Art. 166). Nor does the auditor answer for internal control: management acknowledges that responsibility from the acceptance of the engagement. The auditor studies internal control to design the audit work, not to express an opinion on its effectiveness. The assurance remains reasonable: a high level, but not an absolute one.
To prepare for the auditor’s visit, add the tool inventory, the documented settings and the logs to the usual documents. Audit and statutory audit engagements apply these standards, whatever tools the entity uses.
Points to watch
- No document, no entry: the tool proposes, an identified person approves against the document (Art. 1 of Law 9-88).
- Keep the tool inventory up to date, individual AI assistants included.
- Keep documents, entries, approvals, settings and exports for ten years (Art. 22 of Law 9-88).
- Review settings before each year-end close and describe any change of method in the additional information statement.
- Send no personal data to a service hosted abroad without checking Art. 43 and 44 of Law 09-08 and the declaration.
- Separate recording, approval, payment and settings, and review rights at each departure.
- Describe these rules in the accounting organisation manual above 10 million DH of turnover (Art. 4 of Law 9-88).
READ ALSO:
- Internal control in Moroccan SMEs and mid-sized companies: key controls by cycle
- Fraud in SMEs: embezzlement schemes and warning signs
- International transfers of personal data in Morocco: legal framework and obligations
- The 2027 agenda for the executive and the board of directors
Frequently asked questions
Is an entry proposed by an AI tool valid in the accounts?
The texts make no distinction by tool. Every record states the origin, content and allocation of the transaction and the references of the supporting document behind it (Art. 1 of Law 9-88). The CGNC requires data received from another processing system to rest on a supporting document with evidential value. An entry without a document does not meet these requirements, whoever produced it. An identified person approves it against the document before it enters the accounts.
Can payroll or customer data be sent to an AI tool hosted outside Morocco?
If the data concern natural persons, Law 09-08 applies: its definition of processing covers consultation, use and disclosure by transmission. A transfer to a foreign State is allowed only if that State ensures an adequate level of protection (Art. 43); the National Commission draws up the list of these States. Failing that, Art. 44 provides exemptions, including the express consent of the person, the performance of a contract with them and the express and reasoned authorisation of the National Commission. The declaration of the processing states the planned transfers and the use of processors, and any change goes to the National Commission without delay (Art. 15). Send only the data the analysis needs (Art. 3).
Should AI tools be described in the accounting organisation manual?
Above 10 million DH of annual turnover, the company prepares a manual describing its accounting organisation (Art. 4 of Law 9-88). The CGNC provides for a procedures manual where it is needed to understand the processing system and to carry out controls. A tool that records, matches or proposes entries is part of that organisation: the manual states what it does, who approves its proposals and what the company keeps.
Does the statutory auditor approve the AI tools used by the finance team?
No. The auditor gains an understanding of internal control, including financial information systems, to design the audit procedures, but not to express an opinion on the effectiveness of internal control (SME Audit Standards Manual). Management acknowledges its responsibility for internal control, and the statutory auditor's engagement excludes any interference in management (Art. 166 of Law 17-95). The auditor communicates in writing the significant deficiencies identified and, in the SA, reports to the board the irregularities and inaccuracies discovered (Art. 169).
How long should the records of automated processing be kept?
Accounting documents and supporting documents are kept for ten years (Art. 22 of Law 9-88). The CGNC requires the durability of recorded data and access to the documentation on the analysis, programming and processing procedures. The procedures manual is kept for as long as the accounting documents it relates to. Also keep the settings in force, the approvals and the prompt that produced each proposal: these items link the entry to its origin.