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.

Mancy Desaee
  • 1,817
  • 4
  • 23
  • 46
Shomit
  • 35
  • 10

2 Answers2

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));
        }
    });
}
Atish Kumar Dipongkor
  • 13,371
  • 5
  • 32
  • 64
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

Sabitha S
  • 339
  • 1
  • 6