Is it possible to get all the user profiles in SPO using CSOM...apparently no...

Highlighted
MVP

Hi all,

Is it possible with current version of CSOM to get all the user profiles? I think the answer is No, but I would like a confirmation from the buddies over here and also alternative ideas to get similar information using the Graph in an Azure Function. cc @Vesa Juvonen

2 Replies
Highlighted

Been a while but found some of our old docs on this which seems still valid. You can't access a collection of all user profiles, but you can ask a user profile for specific account identifier... so as long as you have the account names, you can access user profiles.

 

 

If you'd do this through Graph, you won't get access to potential additional SP user profile properties, which could be there... we do not really recommend them as such, but they can be useful in many scenarios until the proper integration is there with AAD and SP User Profiles. 

Highlighted

I know this is a workaround, but we usually do it with search API.

By providing Querytext="*" and SourceId="b09a7990-05ea-4af9-81ef-edfab16c4e31".