I am working with SharePoint on-premise 2019 and I am trying to get job title from multiple users that are stored in a list as an object.

I am using pnp-sp-js and React framework and can successfully get users ID from a list and then users data with pnp-sp-js siteUsers but jobTitle is missing. What is the other way to get users job title or am I doing something wrong?

let tempData = await pnp.sp.web.lists
    let users = [];
    for (let i = 0; i < tempData.length; i++) {
      users[i] = await pnp.sp.web.siteUsers.select("jobTitle").getById(tempData[i].userId).get();

2 Answers 2


I got the jobTitle from the AD with the help of LoginName and getUserProfilePropertyFor. LoginName property was received with this line:

users[i] = await pnp.sp.web.siteUsers.getById(tempData[i].UserId).get();

and the anwser (jobTitle is stored in property named SPS-JobTitle):

 for (let i = 0; i < tempData.length; i++) {
      let a = await pnp.sp.profiles.getUserProfilePropertyFor(
      temp_jobTitle[i] = a;

You can get the Job Title of user using SharePoint REST API like:

<site url>/_api/web/lists/getByTitle('List Name')/items?$select=Title,Author/JobTitle&$expand=Author

Where Author is internal name of Person or Group field. You can get the internal name of any of your list columns by following this article: How to find the Internal name of columns in SharePoint Online?

Similarly you can expand the person or group field using SP PnP JS and select the Job Title of user, like:

import { sp } from "@pnp/sp";
import "@pnp/sp/webs";
import "@pnp/sp/lists";
import "@pnp/sp/items";

const items = await sp.web.lists.getByTitle("List Name").items.select("Title", "Author/JobTitle").expand("Author").get();

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.