If you ever wondered how to filter through a SharePoint Person or Group column in Power Automate Get Items action, you’re in the right place.
The scenario is this. You have a list of Employees, and the Person (only) column is called Employee. To filter through that column you need to choose the value you want to filter on since the Person column is a lookup column and contains more than one value.
So if you want to filter on the person’s name i.e., DisplayName the following is the query you need to use:
Empployee/Title eq ‘John Smith’
What I recently learned by using Power BI Is when you try to expand on the Person column, you will see what “attributes” are available. DisplayName is not one of them, but the Title is. The person column is a hidden user list in SharePoint that is synced with Office 365 users list, whether your users are Office 365 only or synced with on-prem Active Directory. The system between Office 365 and SharePoint is happening in the background and we have no control over it.
The available attributes are: (case sensitive)
- Title (Name, Full Name or Display Name)
- Name (Claims, i.e., i:0#.f|membership|[email protected])
- EMail (email address)
- MobilePhone
- Notes
- Department
- JobTitle
- FirstName
- LastName
- WorkPhone
- UserName (this is the UPN where in some cases could be slightly different than the company email address. For example, the way I do this is that I create username like this: [email protected] as the UPN and [email protected] as the offical email. Of course both will work as an email address. Following this logic introduces an additional security layer for users that fall a victim of phishing where their official email address often gets pre-populated on dodgy fake-login-websites. The user enters their password, but the actual username is not their email so it’s confusing to scammers and they neger get to “hack” into their accounts)
- many more are available and if you want to see them all, go to Power BI, connect to a SharePoint list, open the list (data source) in Power Query Editor and expand the person column to see all available atrrubites. You can do the same in Excel. Create a new spreadsheet, in Data click Get Data, select Sharepoint online, select the list, open the list in Power Query Editor and viola.