Forum Discussion
Is there an API to read Microsoft forms data
ProtivitiDan Any more information about this? I can get JSON responses as you did, but was not successful getting form responses. Wondering if any documentation has appeared anywhere.
- ProtivitiDanSep 01, 2021Copper Contributor
waltksfc I abandoned my attempts at the time, but looking at it again now I see that I can get info on a specific form with:
https://forms.office.com/formapi/api/forms/{formid}
Then I can get the questions or responses on that form with these:
https://forms.office.com/formapi/api/forms/{formid}/questions https://forms.office.com/formapi/api/forms/{formid}/responses
Get the {formid} from the /forms API call.
- Oh_No_Its_MicrosoftOct 06, 2023Brass Contributor
Unfortunately, now in 2023 the useful calls to forms API to get responses, now just doesn't work.
This works to get ID and other bumpf:
https://forms.office.com/formapi/api/forms
However, to get very useful form and responses:
https://forms.office.com/formapi/api/forms/{form id}
https://forms.office.com/formapi/api/forms/{form id}/reponses
.....using the "form id" from the https://forms.office.com/formapi/api/forms
.... now does not work. I tried all sorts of variants methodically.
I guess Microsoft is desperate for people to get tied into their very old asynch/dynamics infrastructure and go through "PowerAutomate" aka "Flow" instead, to output raw data to an incredibly slow SharePoint list, or an archaic Excel with all the bugs!
Ah! Why is so much in Microsoft-land so disappointing!
Data Scientists want the raw data on-tap!
Why force developers into another inefficient Microsoft infrastructure that's built to tie the customer into a poor solution?
- GideonHuangOct 08, 2023
Microsoft
Oh_No_Its_Microsoft Hi Dan, thanks for being interested in using Forms api to get form and response raw data. https://forms.office.com/formapi/api/forms/... are not designed for programmed retrieving data and it would be changed by other scenario needs and infrastructure changes. We're working on publishing microsoft graph api for Forms which will be used for the programmed retrieving data. These Forms Graph APIs will be released in coming monthes.
FYI Ruoying Liang
- aura_sanDec 06, 2021Copper Contributor
Hello, ProtivitiDan,
Do you know where can I find API documentation or any kind of guide?
I'm trying to retrieve responses for a specific QuestionId but can't seem to find the combination for the GET request.
Thank you!
- ProtivitiDanDec 06, 2021Copper ContributorSorry @aura_sun, but I don't know of any official documentation from Microsoft yet. JR2021 may have one of the best guides to date in the thread above.
Dan
- waltksfcSep 02, 2021Copper Contributor
ProtivitiDan - thanks for the reply. Yep - that works. Successfully retrieved JSON-formatted questions and responses - but only after logging in/authenticating in our O365 tenant. I can see that the Forms design page is making AJAX calls to the API, but it looks like it's passing some sort of access tokens in the request headers/cookie. It would be nice if Microsoft would publish some information about this, and allow some kind of persistent access token in the url/path for an API call - as they do when they provide a shared collaboration link.
At this point, I've already created a process to ingest the responses from a downloadable Excel sheet, so there's probably no advantage for me to use the API (since I have to be authenticated before it will work).
Thanks again - appreciate you taking the time to respond.
- marshall smithJan 24, 2022Copper Contributor
Is there any way you could let me view your code? I am trying to do the exact same thing you mentioned above.
Currently I manually click the "Open in Excel" button under "Responses" Tab. There is a macro that copies the data from sheet 1 into sheet 2 and does some re-formatting and parsing of image urls etc. Then it takes the values from each field and places them into specific bookmarked fields in a word template to build a standardized report. As of right now I have to manually dl the excel file after each submission then manually enter the store number to choose which row to use to build the correct report.
I would like to just be able to link the table in excel to the data produced by clicking the button. But even if I could just automate the process of "open in excel" it would help tremendously. I am stuck here and quite frustrated. I have tried power automate but get lost pretty quickly.
Could you share your methodology? I would truly appreciate it.
Thanks in advance!