I'm trying to get user's information using REST call to a list. The list named "Members" has two fields:

Team: Single line of text

User: Person or group

The code piece for REST call is below:

var queryUrl = "<web url>/_api/web/lists/getbytitle('Members')/items?$select=User/UserName,User/EMail&$expand=User";

    url: queryUrl,
    type: "GET",
    headers: {
        Accept: "application/json;odata=verbose"
    async: false,
    success: function (response) {
    error: function (response) {

There are few items in the 'Members' list. The issue I'm facing is that for some users the 'User/UserName' value is returned null.

How can I debug the issue?

1 Answer 1


There could be a case that username is empty in UserProfile.

Try to fetch other user properties:


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.