There are two important REST API Services available to get the current logged in user or get full account details using the userId.

SharePoint-2013-Hosting1This will return complete details of the current logged user in your data in XML. If it is run in the browser itself, we can create an AJAX call and get particular value (or) filter it.

Another way of getting value using User Id value is to consume “_layouts/15/userdisp.aspx” and pass userId as query string value and get complete myblog site as response.

Complete function

Debugger Console screenshot.

11

The Data object contains all user profile properties.