Forum Discussion
API to access MS forms
ravipokala I'm using VBA + SeleniumBasic-2.0.9.0
You must first open the URL “https://forms.office.com/Pages/DesignPage.aspx” to obtain a token
Then you can call "https://forms.office.com/formapi/DownloadExcelFile.ashx?formid=" + put your form ID Here + "&timezoneOffset=180&minResponseId=1&maxResponseId=1000"
This is working for me
- Christian ZenzanoDec 07, 2023Brass Contributorwhen using https://forms.office.com/formapi/DownloadExcelFile.ashx?formid= + formID i get the following error from PowerBI
we were unable to connect because this credential type isn't supported for this resource. please choose another credential type.
what is interesting is that coping the URL to edge it downloads the form.- AndreaMXTDec 22, 2023Copper Contributor
I am trying to bump this thread. What is the easiest way for getting the excel file from a specific Microsoft Forms in an automated way?
Are the Org_Settings.Forms the only permissions that are required for reading the responses to a specific form?
- ssahalNov 30, 2020Copper ContributorLeandro_Abade could you please highlight on how did you obtain the token? Did you have to register in app in Azure portal or by some other way. I am implementing something similar and stuck with the first pre-requisite of obtaining token.
- Leandro_AbadeNov 30, 2020Copper Contributor
Hi ssahal ! You just need access the URL “https://forms.office.com/Pages/DesignPage.aspx”, then in same section you calls "https://forms.office.com/formapi/DownloadExcelFile.ashx?formid=" + [put your form ID Here] + "&timezoneOffset=180&minResponseId=1&maxResponseId=1000"
The token is automatically generated in the site section.
So, unfortunately, you need to use a browser to use the API. I tried everything to get files using code and nothing worked.
If you find out how to generate the token by code, please share it with us! Tks
- ssahalNov 30, 2020Copper ContributorSure thing. I am trying to generate the code so I could further process the forms data in an internal workflow. Once I have the full picture will share it with community 🙂