How to call user profile service in client object model (ECMA)? I need to fetch department ID or name of current logged in user in Sharepoint 2010.


You could use SPServices, or you could query the user information list using CSOM. For anyone who finds this thread and has 2013, the best option in 2013 would be the REST services for the people service.

Here's a blog post I wrote a while back that pulls the user profile image using CSOM... this should get you in the right direction.


For retrieving the entire User Profile you can use the User Profile Service. It is a library called SPServices which contains this functionality.

See the link below:


This link describes how to use this code library to retrieve the User Profile Properties:


You can also check:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.