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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Internal_EntityWithSameKeyExists error when uploading attachment to a Purchase Invoice

(0) ShareShare
ReportReport
Posted on by 36

Hi All,

i'm using the attachments endpoint to upload attachments to Purchace Invoices:

api.businesscentral.dynamics.com/.../attachments

But for a specific tenant I'm getting the following error response:

{"error":{"code":"Internal_EntityWithSameKeyExists","message":"The record in table Unlinked Attachment already exists. Identification fields and values: Id='{00000000-0000-0000-0000-000000000000}' CorrelationId: d1a71c10-1249-44c5-a051-4fc6886033d5."}}

I've confirmed that the right values are being passed to the endpoint. The same code works fine for several other tenants as well.

Any ideas will be greatly appreciated!

Thanks!

Kiril

I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    Microsoft Employee on at

    Hello,

    Feel free to raise this issue to Microsoft support via your partner or CSP. I do not think we cannot answer this issue without getting view access to the system.

    Thanks.

  • Kiril Nikolov Genov Profile Picture
    36 on at

    Thanks, I suppose I should do that.

  • Verified answer
    Kiril Nikolov Genov Profile Picture
    36 on at

    Ok, found the problem, wrong api version was set in the url. Sorry to bother!

  • Suggested answer
    Marco Mels Profile Picture
    Microsoft Employee on at

    Thank you for sharing final outcome and no bother at all!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 562 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 503 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 332 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans