Jun 06 2022 05:15 AM
Hi,
I am looking for MS Forms API documentation where I can find out more information about the implementation.
How do we authenticate our system against the MS Forms API where the implementation occurs?
Where do all the responses in MS Forms get stored?
Is it possible to purge the responses of MS Form from the persistence storage?
Much appreciated!
Jun 06 2022 06:13 AM
@hedecan there's very little documentation out there but you can view the forum response here which will give you some info.
The responses are stored depending on your location, so that could be UK, Europe, Australsia, North America etc.
You can delete all the responses for a form with a flow in Power Automate that sends an HTTP request to the api:
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Jun 06 2022 05:00 PM
Thanks @RobElliott
Regarding the data storage location, is that linked to the Azure tenant's location or any other condition?
I just want to make sure it is located within Australia where I am located.
Thanks
Jun 07 2022 01:36 AM
Feb 20 2023 07:14 AM
I have tried to implement your solution but it does not work.
It does not delete the response.
Feb 20 2023 07:17 AM - edited Feb 20 2023 07:20 AM
@lhaydee just saying it doesn't work with no other information doesn't really help us to help you. Could you give a screenshot of your flow?
Feb 20 2023 07:24 AM
@RobElliott Hi Rob:
The flow looks like this:
First action search the user id
Second compose tenant id
Third, Forms id
Four, Http request
Feb 20 2023 07:51 AM
@lhaydee But you're trying to do something different to what the original post and my solution was about. My solution deleted all responses in the spreadsheet behind the form. It looks like you want to delete the responses from a specific responder. I don't know if this is possible, I've never done it, so someone else might have to give you a solution here.
Feb 21 2023 08:30 AM
@RobElliott Misunderstood the reply. Sorry!
I thought your flow idea allowed to force the deleting of the response.
In my opinion, this field, Forms365, needs to expand on PowerAutomate because there is little info, action and conectors available limiting the possibilities to implement flows.
Anyway, thanks a lot for your response and time.
Leticia
Mar 23 2023 09:54 AM
Mar 24 2023 02:21 AM - edited Mar 24 2023 02:25 AM
Well, just in case you are still interested in how to delete responses from an specific user, here is an approach that I tried and it's working for me.
First of all, you need to understand the structure of the Forms API.
https://forms.office.com/formapi/api/[TenantID]/users/[UserID]/forms('[FormID]')/responses
[TenantID] - no doubts about it, tenant ID where the form is hosted.
[UserID] - is the UserID of the Form owner.
[FormID] - no doubts about this.
If you try this API and take a look to the JSON, you will see each response has an ID.
To delete a single ID, you just need to use the delete method specifying the response ID.
https://forms.office.com/formapi/api/[TenantID]/users/[UserID]/forms('[FormID]')/responses([ResponseID])
But if you need to delete all responses from specific user, you may use the first API call to collect all responses, parse the JSON, filter the array by responder property. Just note the responder property uses the responder UPN, not the email.
Now you have an array with the responder UPN and the response ID, just use an apply to each loop to delete each response.