Forum Discussion
ravipokala
Jun 15, 2020Copper Contributor
API to access MS forms
Looking for an API to access MS forms and pull the survey results on a weekly basis.
pjjohnson
Microsoft
Oct 28, 2021It requires an access token which can be issued by first logging into https://forms.office.com. Using a new tab in the same browser session to access the API URL should work then. If assigning to an Azure AD application, you'll find "Microsoft Forms" in the "APIs my organization uses" in the API Permissions panel. If assigning Application API Permissions, it requires Admin consent. When running from the browser, you're running under your user context and will only see the forms you own.
https://forms.office.com (to get access token in browser)
https://forms.office.com/formapi/api/forms (see all forms you own)
https://forms.office.com/formapi/api/forms/{form ID} (see a specific form)
https://forms.office.com/formapi/api/forms/{form ID}/questions (see a specific form's questions)
https://forms.office.com/formapi/api/forms/{form ID}/responses (see a specific form's responses)
https://forms.office.com (to get access token in browser)
https://forms.office.com/formapi/api/forms (see all forms you own)
https://forms.office.com/formapi/api/forms/{form ID} (see a specific form)
https://forms.office.com/formapi/api/forms/{form ID}/questions (see a specific form's questions)
https://forms.office.com/formapi/api/forms/{form ID}/responses (see a specific form's responses)
badsector82
Dec 14, 2021Copper Contributor
That looks like an API to get the results from a form. This could be done with Logic Apps. What I'm looking for is a way to create new forms programmatically, e.g. from powershell.