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

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Unanswered

Issue With Bulk Delete via API - Dataverse

(0) ShareShare
ReportReport
Posted on by

I am trying to delete some data from Dataverse using the API, I need to run this after some testing during a pipeline, hence why I need to use the API.

I am noticing differences between using the API vs UI.

I am trying to delete any rows which were created by a User which starts with SVC...

The below runs successfully in the UI and deletes the relevant rows:

User's image

 

I then try to re-create this with the API, here is the JSON I use:

{

"QuerySet": 

[

{

"EntityName": "customeraddress",

"Criteria":

{

"FilterOperator": "And",

"Conditions": 

[

{

"AttributeName": "createdby",

"Operator": "BeginsWith",

"Values" : [

{

"Type": "System.String",

"Value": "SVC"

}

]

}

]

}

}

],

"JobName": "Bulk Delete Address - Test Account",

"SendEmailNotification": false,

"RecurrencePattern": "",

"StartDateTime": "2024-12-18T11:09:00Z",

"ToRecipients": [],

"CCRecipients": []

}

 

I get the below error:

 

{

"error": {

"code": "0x80040203",

"message": "An exception System.FormatException was thrown while trying to convert input value '[REDACTED]' to attribute 'customeraddress.createdby'. Expected type of attribute value: System.Guid. Exception raised: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."

}

}

 

Why can I create this via the UI but not the API?

Any help would be appreciated, thanks.

Categories:
I have the same question (0)
  • Suggested answer
    Shashank Bhide Profile Picture
    942 Moderator on at
    Issue With Bulk Delete via API - Dataverse
    CreatedBy is a lookup(to the user) object and not a string. I'm not sure what exactly will go into the JSON to specify a lookup(object) but if you use fetchXML with C# below article might help
     
     
  • ronaldwalcott Profile Picture
    3,827 Super User 2025 Season 2 on at
    Issue With Bulk Delete via API - Dataverse
    This seems to indicate that the process becomes two steps where you first retrieve the GUIDs of the users then create the delete job using those GUIDs 

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…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 714 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard

Featured topics