Forum Discussion
Mercy Shitemi
Nov 25, 2016Copper Contributor
Is it possible to run a query to find which user profiles are missing a picture?
I believe the way to do this would be using CSOM, but I have not been able to figure out how. We user sharepoint online and our tenant has about 1300 user profiles. We build our organisational chart off this pool and we would like to make sure each user has a picture.
I hope someone here has some ideas.
Thank you,
Mercy
You could use Get-PnPUserProfileProperty
Are you looking for PowerShell or code?
PowerShell:
https://github.com/SharePoint/PnP-PowerShell/blob/master/Documentation/GetPnPUserProfileProperty.md
- Mercy ShitemiCopper Contributor
"Are you looking for PowerShell or code?" Which ever one would work.
The result I am looking for is a list of all users missing the profile picture property. The comand you gave me would require I look at the user profiles one at a time?
Mercy
Ok, here you go the full Powershell script to get this done: