web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Need help with Egyptian E-Invoicing – Error at "Egyptian Tax Authority submit" action

(3) ShareShare
ReportReport
Posted on by 61
Hey everyone,
I’m in the process of implementing the out-of-the-box e-invoicing solution for Egypt in D365 F&O, and I’ve hit a bit of a wall.
I’ve imported the latest “Egyptian electronic invoice (EG)” feature and filled in all the required values in the pipeline (client ID, secret, etc.). After deploying everything, I tried submitting an invoice to the ETA portal.
Everything seems fine up until the "Egyptian Tax Authority submit" action – that’s when it throws this error:
System.NullReferenceException: Object reference not set to an instance of an object.   at Microsoft.Dynamics.ElectronicInvoicing.Pipeline.Actions.EgMyRestClientActionBase.SendRequestAsync(CancellationToken cancellationToken) in C:\__w\1\s\src\Pipeline\Pipeline.Actions\EgMyRestClientActionBase.cs:line 304   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.ExecuteAsync(ILogger logger, EventId eventId, ActivityType activityType, Func`1 action, IEnumerable`1 additionalCustomProperti
 
This happens right after the signed files are fetched from Azure.
I’ve already:
- Double-checked the client ID and secret with the customer – they’re all good
- Tried tweaking the pipeline setup and redeploying
- Revalidated the action parameters
 
Still getting the same error 😓
Has anyone else come across this? Would really appreciate any ideas or pointers.
 
Thanks in advance!
I have the same question (0)
  • Suggested answer
    Jalal Sabir Profile Picture
    10 on at
    Absolutely — here’s a focused solution-oriented reply you can use, tailored for your scenario with Egyptian E-Invoicing in D365 F&O:

    Possible Solution for “System.NullReferenceException” at “Egyptian Tax Authority submit” Action in D365 F&O
    You're on the right track with your setup, and this specific error —
    System.NullReferenceException: Object reference not set to an instance of an object
    — typically points to a missing or improperly configured parameter within the pipeline action, most likely within the SendRequestAsync method inside the EG-specific REST client base class.

    Here are a few things to check and try:

    1. Pipeline Parameters – Double-check Required Fields
    Even though you’ve filled them out, recheck these in Electronic Invoicing > Features > Egyptian electronic invoice (EG) > Setup > Actions > Egyptian Tax Authority Submit:
    • Url – Make sure the ETA environment URL is correct (https://api.invoicing.eta.gov.eg for production or https://api.preprod.invoicing.eta.gov.eg for pre-prod).
    • API Version – Required for some setups.
    • Document UUID / Internal ID – Ensure this is populated in the context correctly.
    • Certificate Thumbprint or Client Certificate – Must be assigned properly if mutual TLS is required.
    Sometimes this error is thrown if one of these parameters is referenced in code but not initialized during runtime.

    2. Client Certificate Setup in Azure Key Vault
    If you're using Azure Key Vault to store and retrieve the signing certificate:
    • Make sure the Key Vault access policy allows the e-invoicing application access to both get and sign operations.
    • Ensure the certificate is enabled, has a valid private key, and is not expired.
    • In some cases, you must manually associate the certificate in Electronic Invoicing > Parameters > Certificates.

    3. Logging & Debugging in LCS / Monitor Tool
    Use the Electronic Invoicing Monitor to trace the action before the failure:
    • Navigate to Electronic Invoicing > Monitor > Execution logs.
    • Locate the failed submission and open the execution context.
    • Review input/output variables – see if any are empty or unexpectedly null.
    Focus especially on the values coming into SendRequestAsync — a missing or empty access_token, baseUrl, or documentUuid could be the culprit.

    4. Feature Versioning & Deployment
    Verify you're on the latest version of the "Egyptian electronic invoice (EG)" feature, and it has been deployed and published in the correct environment:
    • After making changes to parameters or actions, publish and deploy the feature again.
    • Confirm the deployment status in the Electronic Invoicing Service environment in LCS.

    5. Fallback: Custom Logging in Pipeline
    As a last resort, you can temporarily extend the pipeline to include logging actions (e.g., Log action) before the failing step to pinpoint what’s null.

    Final Tip:
    If all else fails and everything looks perfect, it may be worth redeploying the entire Electronic Invoicing feature from scratch, as metadata corruption or partial deployments have been known to cause similar behavior.
     
     
    Top of Form
  • Suggested answer
    Holly Huffman Profile Picture
    6,538 Super User 2025 Season 2 on at
    Good morning, afternoon, or evening depending on your location!
     
    Based on the error details, it appears that the issue is related to a NullReferenceException occurring during the "Egyptian Tax Authority submit" action. This typically indicates that an object required for the request is missing or not properly initialized.
    Recommended Troubleshooting Steps:
    1. Verify API Credentials & Configuration:
      • Since you've already confirmed the client ID and secret, double-check that all required authentication parameters are correctly configured in the pipeline.
      • Ensure that the API endpoint URL is correctly set and accessible.
    2. Check Azure Signed File Retrieval:
      • The error occurs right after fetching signed files from Azure. Confirm that the files are correctly generated and accessible.
      • Validate that the signing process completes successfully before submission.
    3. Review Pipeline Setup & Dependencies:
      • Ensure that all required dependencies for the EgMyRestClientActionBase class are properly deployed.
      • Check if any missing configurations or updates are required for the latest Egyptian electronic invoice (EG) feature.
    4. Enable Detailed Logging & Debugging:
      • Turn on tracing and debugging in the Electronic Invoicing feature to capture more details about the request failure.
      • Review logs for any additional error messages that might indicate missing objects or misconfigurations.
    Hope this helps some!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans