Skip to main content

Notifications

Community site session details

Community site session details

Session Id : XLOgfxJPln7OIqIoA5szR/
Power Apps - Microsoft Dataverse
Answered

Deleting all rows from a dataverse table via API?

Like (0) ShareShare
ReportReport
Posted on 25 May 2023 14:45:05 by 35

Hi all, I am using C# and the Dataverse API to dynamically create tables based on the columns in an Excel spreadsheet. I'd like to be able to clear out all data in the table NOT using the Bulk Delete in the Admin site. Is there a way to do this?

  • ebonnett Profile Picture
    35 on 26 May 2023 at 15:30:43
    Re: Deleting all rows from a dataverse table via API?

    Leksie, thanks for the tip. I did not know that was an option. I'll check it out and report back, maybe I'll post a code snippet once I get it working so others may benefit.

  • Verified answer
    Richard_S Profile Picture
    34 on 26 May 2023 at 15:12:55
    Re: Deleting all rows from a dataverse table via API?

    Hi @ebonnett,

     

    you could call the bulkDelete action via the WebAPI I guess.

    https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/reference/bulkdelete?view=dataverse-latest

    As per my understanding this is basically nothing else than what the bulk delete in the admin site does. Also I would think you need to pass it a query string of the records to be deleted.

    Never used myself, but maybe that's what your looking for.

  • ebonnett Profile Picture
    35 on 25 May 2023 at 17:56:10
    Re: Deleting all rows from a dataverse table via API?

    Trying to delete all so I don't want to address one row at a time. Basically DELETE FROM <tablename>. 

  • Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on 25 May 2023 at 16:16:30
    Re: Deleting all rows from a dataverse table via API?

    Hi @ebonnett ,

     

    Looking to use something like this or are you trying to do a delete all?  https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/update-delete-entities-using-web-api 

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

#2
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 9

Overall leaderboard

Featured topics

Loading started