Power Automate - Get SharePoint items using Created By/Modified By

Recently I had an interesting request where someone was trying to filter items based on the Created By field in SharePoint using Power Automate. I thought, that should be pretty straight forward, make a claim or something similar and I headed to Google.

Surprisingly there's not actually that many hits and it took quite a bit of digging. The answer once you realise is pretty straight forward.

SharePoint holds a hidden(ish) list, the "User Information List" you can view it by adding the following to a Site Collections URL: 

/_catalogs/users/simple.aspx

This list holds all the "Ensured Users" on the site - you can google that one if you want to find out more. It also holds the information on which you can use in the filters for People Fields. Here are all the useful filters you can use:

"ItemInternalId":"11",
"ID":11,
"Title":"Martin Pyman",
"Name":"i:0#.f|membership|martin@marnotechnology.com",
"EMail":"martin@marnotechnology.com",
"SipAddress":"martin@marnotechnology.com",
"IsSiteAdmin":true,
"Deleted":false,
"UserInfoHidden":false,
"Picture":"https://marnotechnologycom-my.sharepoint.com:443/User%20Photos/Profile%20Pictures/martin_marnotechnology_com_MThumb.jpg",
"FirstName":"Martin",
"LastName":"Pyman",
"WorkPhone":"123456",
"UserName":"martin@marnotechnology.com",

Keep in mind the Power Automate query uses the column internal names, which are Editor and Author respectively. The other part is how do you query into those People Fields, turns out all you need to use is a forward slash:


Hope it helps!

Comments

Popular posts from this blog

Use Power Automate to create a Document Set – The easy way!

Power Automate - Update SharePoint item metadata using only variables

SPFx Christmas Banner Treat