Finding the owner of a Microsoft Form based on the Form Id

A colleague wanted me to raise a case with Microsoft to see if there was a way to find the owner of a form based on the Id. I did a quick Google and there didn’t seem to be a way… all suggestions were to send the form link modified to open the edit mode around (https://forms.office.com/Pages/DesignPage.aspx?origin=shell#FormId=<YourFormID>), and see if anyone can open it. Kind of like King Arthur’s sword (“Whoever pulls out this sword from this stone is the true king of England!”) or Thor’s Mjolnir (“Whosoever holds this hammer, if he be worthy, shall possess the power of Thor“). :)

It’s too hot outside and ideally I should be out walking, instead I decided to be unhealthy and sit at home and see if there’s some way to find the owner.

I opened the form and went through the source code (did a quick search for words like “owner”) but didn’t find anything. Then I thought let me dig around with the “Inspect” tools.

So I right clicked and selected “Inspect”. Am on Firefox.

Went to the Network tab and did a Reload.

First I tried the “ResponsePage.aspx” file and its Response headers… but that was just stuck.

The “ResponsePageStartup.ashx” looked interesting. No idea what it is but it was the only other non JS or CSS file I found there… plus it had “Startup” in the name, maybe it does something interesting?

The Response is a JSON. So I kept expanding it (started with “data”).

Under “data” > “Form” I finally struck gold!

Excitedly I did a Get-MgUser -UserId <theabove> and got nothing. Good thing I didn’t give up, coz I logged into Azure AD and put the Id in the main search page. Turns out it was an M365 group. Sweet!

FYI, the full Url to that page is https://forms.office.com/handlers/ResponsePageStartup.ashx?Id=<FormId>

ps. The story continues…

Update: Next time, I should use Get-MgDirectoryObject -DirectoryObjectId "<id>").AdditionalProperties instead of Get-MgUser. This will work with any object and not error out like above.

Update 2 (23rd May 2023): Thanks to reader Andrew Burow who wrote to say this doesn’t work if the form has expired. He came across the workaround in this forum post and was able to get the owner id. If the form is owned by a group then the URL in the post will be /groups/... instead of /users/.... Thanks Andrew! :)