cancel
Showing results for 
Search instead for 
Did you mean: 

Flow action to delete all MS Form responses

It would be great to have an action that when triggered deletes a response or possibly all responses from within Microsoft Forms. Due to GDPR having data saved both in Forms and in SharePoint (if the form data is copied into SharePoint) is not ideal and there is currently no way to automate the deletion of the responses from within Flow. I know all of the responses within a form can be deleted from within the Forms action menu so having something similiar as an action within Flow would be great. Looking at the http request being sent after clicking the delete all responses button it seems like it's an easy enough API with the form ID and user details being sent however as it uses token authentication there is no easy way to easily setup flow to mimic this without setting up OAuth to obtain authentication first. Can an action be created in flow to wipe all responses from a form?
Status: New
Comments
mrita
New Member

+1 for this need.

 

Watching http call with Fiddler one can see a DELETE to :

https://forms.office.com/formapi/api/<tenantid>/users/<userid>/light/forms('<formid>')/responses

 

As op initially wrote, this call is unsuccessful without a token.

mrita
New Member

Watching what happens when one presses 'Delete All Responses' we can see a DELETE http call to :

https://forms.office.com/formapi/api/<tenantid>/users/<userid>/light/forms('<formid>')/responses

 

but as op wrote, without an Oauth token this fails.

Does anyone know how to get an oauth token for forms ?

sonnyblanco
New Member

If they base it on GDPR, then they should've implemented a region-based version to be fair with non-EU users.

 

For everyone wanting to get OAuth for Forms, I've ran across this and might be helpful - https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow

Django
Kudo Kingpin

+1 Could be an action within the Connector to delete response

JPRomero
New Member

Useful for when Forms is an interface for populating a SharePoint list. +1

DamoBird365
Super User

Hey all, I’ve a video demo showing you how you can not only get all responses, but also delete all form responses using an unpublished api call. Microsoft Forms Get ALL Response Details Downloaded via Power Automate

 

Damien

Mellum
Regular Visitor

Thanks @DamoBird365 !

Tested, and works like a charm 😁 had to change the @{outputs('FormID')} with the actual form-id though.

MattyG2021
Regular Visitor

@DamoBird365 

Dude, you're the man!  Thank you so much for finding that.  That closes a big gap for our company.

 

Great work!  Now, if only Microsoft would just make that an action for us to use in Power Automate....