0

I have a requirement to fetch user details in SharePoint 2010. Just like SharePoint 2013, are there any web services available which can used in JavaScript Code?

I need to fetch user details that include mobile number, organization name, office.

Please suggest the solution for the same.

2 Answers 2

2

You can do it in SharePoint 2010 by querying following end-point.

/_vti_bin/ListData.svc/UserInformationList

Add your required properties in $select operator.

/_vti_bin/ListData.svc/UserInformationList?$select=Id,Name,..

Example using jQuery

function getUsers() {
    $.ajax({
        url: "/_vti_bin/ListData.svc/UserInformationList",
        type: "GET",
        headers: {
            "accept": "application/json;odata=verbose",
        },
        success: function(response) {
            console.log(response);
        },
        error: function(error) {
            alert(JSON.stringify(error));
        }
    });
}
7
  • hey buddy thanks will plss expand your suggestion .....i am new to sharepoint
    – Shomit
    Jun 21, 2016 at 12:41
  • check my example Jun 21, 2016 at 12:44
  • thanks budddy let me implement it and i will get back to u.
    – Shomit
    Jun 21, 2016 at 12:47
  • The user info list is only a subset of user information from the User Profile. For the full user profile you can hit the User Profile Web Service (/_vti_bin/UserProfileService.asmx) and make a SOAP request. There are 1000s of examples on the web for this. Jun 21, 2016 at 12:53
  • guys thanks for help...how to get attributes from that response variable...
    – Shomit
    Jun 21, 2016 at 17:39
0

This can be done by

  1. SPServices.SPGetCurrentUser
  2. User information list
  3. Use of SP.UserProfiles.js

Refer this link for SPServices.SPGetCurrentUser

Get user detail from userInforList here

With help of UserProfile.JS here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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