Monday, November 4, 2024

Find the owner of a Microsoft Form

Here's a hack to determine who created (and is therefore the owner of) a Microsoft Form:

1) Grab the ID of the form:

https://forms.office.com/pages/responsepage.aspx?id=mHcFBexHuEeJJeYuEg8GOReFjaXIXp5Gn24tRTWqhexUNUw2RDSVY1QkwxV040REZSRy4u&route=shorturl

2)  Append the ID to this url:


and go to the url.  You should see an error like this:




3)  View the source of that page, and search for /users/, and you'll see a url like this:

https://forms.office.com/formapi/api/05057798-47ec-47b8-8925-e62e120f0639/users/a58d8517-5ec8-469e-9f6e-2d435aa908ec

The ID of the user is highlighted.

4)  Go to Azure Portal and do a search for the User ID.  The user should show up in the results.

Monday, April 1, 2024

Power Automate - "The input body for trigger 'manual' of type 'Request' did not match its schema definition. Error details: 'Required properties are missing from object: location.'"

 I've noticed on occasion that when calling a child workflow in power automate, I'd get the following error message:

The input body for trigger 'manual' of type 'Request' did not match its schema definition. Error details: 'Required properties are missing from object: location.'.

From what I can tell, it seems to happen if I save the child workflow in the "New Designer" mode, which adds location as a required field:

{
  "type""Request",
  "kind""Button",
  "inputs": {
    "schema": {
      "type""object",
      "properties": {
        "number": {
          "title""ID Start",
          "type""number",
          "x-ms-dynamically-added"true,
          "description""Please enter the Employee ID to start with",
          "x-ms-content-hint""NUMBER"
        },
        "number_1": {
          "title""ID End",
          "type""number",
          "x-ms-dynamically-added"true,
          "description""Please enter the Employee ID to end with",
          "x-ms-content-hint""NUMBER"
        },
        "location": {
          "type""object",
          "properties": {
            "fullAddress": {
              "title""Full address",
              "type""string",
              "x-ms-dynamically-added"false
            },
            "address": {
              "type""object",
              "properties": {
                "countryOrRegion": {
                  "title""Country/Region",
                  "type""string",
                  "x-ms-dynamically-added"false
                },
                "city": {
                  "title""City",
                  "type""string",
                  "x-ms-dynamically-added"false
                },
                "state": {
                  "title""State",
                  "type""string",
                  "x-ms-dynamically-added"false
                },
                "street": {
                  "title""Street",
                  "type""string",
                  "x-ms-dynamically-added"false
                },
                "postalCode": {
                  "title""Postal code",
                  "type""string",
                  "x-ms-dynamically-added"false
                }
              },
              "required": [
                "countryOrRegion",
                "city",
                "state",
                "street",
                "postalCode"
              ]
            },
            "coordinates": {
              "type""object",
              "properties": {
                "latitude": {
                  "title""Latitude",
                  "type""number",
                  "x-ms-dynamically-added"false
                },
                "longitude": {
                  "title""Longitude",
                  "type""number",
                  "x-ms-dynamically-added"false
                }
              },
              "required": [
                "latitude",
                "longitude"
              ]
            }
          }
        },
        "key-button-date": {
          "title""Date",
          "type""string",
          "x-ms-dynamically-added"false
        }
      },
      "required": [
        "number",
        "number_1",
        "location",
        "key-button-date"
      ]
    }
  },
  "metadata": {
    "operationMetadataId""2447e36d-f686-4dfd-aefa-c73d0383839f4"
  }
}

The only way I've found to fix it is to delete the manual trigger of the child flow, in the old designer view, and recreate the manual trigger from scratch.  And then update anywhere your original parameters were used.

Wednesday, September 14, 2022

Microsoft Forms - Transfer Form Ownership

 To transfer forms for users that are no longer active, just go to:

https://forms.office.com/Pages/delegatepage.aspx?originalowner=jdoe@email.com



And select which forms you'd like to move, and where to move them!

Microsoft Forms - Finding the Owner of a Form

To find the owner of a form, open up the Developer Tools (F12) in your browser, go to the Network Tab -> Fetch/XHR, then look for the one that begins with "ResponsePageStartup", and go to Preview.  Expand  the form data and you can grab the owner id:


Once you have the ID, you can look it up in Azure AD to find the user.



Thursday, July 1, 2021

SharePoint - Add Title Area to a modern page where it's missing

 I've found pages that for one reason or another are missing the Title Area with the banner.  In order to get that back, I just run the following on it (replacing the ID with the ID of the page you're trying to get):


$SiteURL = "https://vivity.sharepoint.com/sites/Test"

$ID = 12

Connect-PnPOnline $SiteURL -Credential (Get-Credential)

Get-PnPListItem -List SitePages

Set-PnPListItem -List SitePages -Identity $ID -Values @{"PageLayoutType"="Article"}


Thursday, March 25, 2021

PowerApps - Trouble passing parameters to Power Automate

 If you connect a Power Automate workflow to a PowerApp, you call the Run() method and can pass it parameters.  If the PowerApp isn't allowing you to add parameters to Run(), just select your object and under Action select Power Automate.  Remove the Flow and re-add it, and you should then be able to add the parameters you want to pass.





Tuesday, February 23, 2021

SharePoint Gallery View - Make images of people bigger

The gallery view in SharePoint is great, especially when used to show people.  For example, I've created a New Hire list that is populated by a Powershell script that pulls in any new hires nightly.  But the images for the people are tiny:

But it's SO CLOSE to what we're looking for!

So with a couple of quick edits, you can increase the size of those images.

  • From your Views, select "Format the current view":

And then select on Card Designer, then Advanced Mode


      

Copy the JSON and paste it into an editor.  Do a search for:

"src": "=getUserImage([$personIterator.email], 'S')"

And replace the 'S' with an 'L' to bring back the bigger image.

Next, find the following block:

"forEach": "personIterator in [$NewHire]",
                    "elmType": "a",
                    "attributes": {
                      "class": "=if(loopIndex('personIterator') >= 5, 'sp-card-userContainer', 'sp-card-userContainer sp-card-keyboard-focusable')"
                    },
                    "style": {
                      "display": "=if(loopIndex('personIterator') >= 5, 'none', '')"
                    },

Add a width and height property to the style section to the size that you'd like the image to be:


"forEach": "personIterator in [$NewHire]",
                    "elmType": "a",
                    "attributes": {
                      "class": "=if(loopIndex('personIterator') >= 5, 'sp-card-userContainer', 'sp-card-userContainer sp-card-keyboard-focusable')"
                    },
                    "style": {
                      "display": "=if(loopIndex('personIterator') >= 5, 'none', '')",
      "width": "100px",
      "height": "100px"
                    },

Pasted this JSON back in, save the view and you should be all set!