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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / [Dataverse Web API] Up...
Power Apps
Unanswered

[Dataverse Web API] Upsert with string external key will fail

(0) ShareShare
ReportReport
Posted on by 108

Hi All,

We are looking to use Dataverse Web API to upsert external data into Dataverse and through our research we found that if the external key field is string type, the upsert fails.  Has anyone in the community encountered the same issue?

 

* PATCH {DataverseWebAPI}/api/data/v9.2/new_table1(new_external_id_string=ABC12345)
-> This will throw an exception.

* PATCH {DataverseWebAPI}/api/data/v9.2/new_table1(new_external_id_integer=12345)
-> This will succesfully upsert the record.

 

There is no mention in the documentation that external key with string type will fail (https://docs.microsoft.com/en-us/power-apps/developer/data-platform/webapi/update-delete-entities-using-web-api)
We ended up creating an integer external key field in a Dataverse table and also changing the external key format on external data to be integer type.  This is very cumbersome as we are looking to integrate our old system to Power Platform and we have at least 10 external data sources we plan to integrate to Dataverse. 

I have the same question (0)
  • Verified answer
    Ram Prakash Duraisamy Profile Picture
    5,593 Super User 2025 Season 2 on at

    Hi @bs-dev001 

     

    Did you tried passing with single quotes?

     

    {DataverseWebAPI}/api/data/v9.2/new_table1(new_external_id_string='ABC12345')

     

    Please mark as Answer if it is helpful and provide Kudos

    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA

    Blog : https://microsoftcrmtechie.blogspot.com

  • kojima Profile Picture
    108 on at

    @rampprakash thank you for your reply and adding single quotes worked like a charm.  Just out of my curiosity, is this mentioned in documentations? 

  • Ram Prakash Duraisamy Profile Picture
    5,593 Super User 2025 Season 2 on at

    Hi @bs-dev001 

     

    Its an OOB Behavior of the WebApi.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard