Obtain a CCSID error

Dear Team,

We are currently attempting to retrieve the Compliance CSID (CCSID) to conduct compliance checks for Electronic Invoice Generation Solutions (EGSs), as outlined in Microsoft’s documentation for enabling integration with D365FO.

However, we are encountering the following error message when executing the onboarding script:

Zatca service communication error: “The remote server returned an error: (400) Bad Request.” Detailed error message: {“errorCode”:“400”,“errorCategory”:“Invalid-CSR”,“errorMessage”:“The provided Certificate Signing Request (CSR) is invalid.”}

As a result, the process of obtaining the CCSID is interrupted.

Could you help us understand what might be causing this issue?

Microsoft documentation: Electronic invoicing onboarding in Saudi Arabia - Finance | Dynamics 365 | Microsoft Learn

Many Thanks,

Dear @aabueid

Thanks for reaching out, and welcome at our community.

Can I kindly ask you to start reviewing the educational library shared on ZATCA site at the first step to ensure a successfully onboarding, you can find the link below.

Ensure to review the technical guidelines and the detailed docs it’s explaining all the steps.

Educational library (zatca.gov.sa)

Additionally, for any further support, do not hesitate to reach out our support team via below email.

SP email: sp_support@zatca.gov.sa

Thanks,
Ibrahem Daoud.

The CSR error in the electronic invoicing onboarding process for Saudi Arabia, as outlined in the Microsoft Dynamics 365 Finance guide, occurs because OpenSSL enforces a 64-character limit for the Organization Unit field. It is important to note that Arabic characters count as 2 bytes, while English characters count as 1 byte. If the organization name exceeds this 64-character limit, the CSR will be invalid during creation. Therefore, it’s essential to keep this character limit in mind when generating your CSR to avoid errors.