1

I looked over other answers that was having the same problem, but those answers don't seem to resolve this problem. How can I get the request to include the Author name? Although, this request returns Author in the response, it doesn't have the actual author details.

Am I missing something on the request or does it need some configuration adjustments?

Setup We have ADFS configured with Sharepoint 2013 on Premise.

Endpoint I'm hitting https://SHAREPOINTURL/_api/web/GetFolderByServerRelativeUrl('Documents')?$select=Author/Id,Author/Name,Author/Title,Editor/Id,Editor/Name,Editor/Title,*&$expand=Files/Author,Editor

Response

{
"d": {
    "__metadata": {
        "id": "https://SHAREPOINT_URL/_api/Web/GetFolderByServerRelativeUrl('Documents')",
        "uri": "https://SHAREPOINT_URL/_api/Web/GetFolderByServerRelativeUrl('Documents')",
        "type": "SP.Folder"
    },
    "Files": {
        "results": [
            {
                "__metadata": {
                    "id": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')",
                    "uri": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')",
                    "type": "SP.File"
                },
                "Author": {
                    "__metadata": {
                        "id": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')/Author",
                        "uri": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')/Author",
                        "type": "SP.User"
                    },
                    "Groups": {
                        "__deferred": {
                            "uri": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')/Author/Groups"
                        }
                    },
                    "Id": 1073741823,
                    "IsHiddenInUI": false,
                    "LoginName": "SHAREPOINT\\system",
                    "Title": "System Account",
                    "PrincipalType": 1,
                    "Email": "",
                    "IsSiteAdmin": false,
                    "UserId": {
                        "__metadata": {
                            "type": "SP.UserIdInfo"
                        },
                        "NameId": "S-1-0-0",
                        "NameIdIssuer": "urn:office:idp:activedirectory"
                    }
                },
                "CheckedOutByUser": {
                    "__deferred": {
                        "uri": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')/CheckedOutByUser"
                    }
                },
                "ListItemAllFields": {
                    "__deferred": {
                        "uri": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')/ListItemAllFields"
                    }
                },
                "LockedByUser": {
                    "__deferred": {
                        "uri": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')/LockedByUser"
                    }
                },
                "ModifiedBy": {
                    "__deferred": {
                        "uri": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')/ModifiedBy"
                    }
                },
                "Versions": {
                    "__deferred": {
                        "uri": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')/Versions"
                    }
                },
                "CheckInComment": "",
                "CheckOutType": 2,
                "ContentTag": "{71501108-7ACC-46F6-82D7-33E5C5F0124C},3,4",
                "CustomizedPageStatus": 0,
                "ETag": "\"{71501108-7ACC-46F6-82D7-33E5C5F0124C},3\"",
                "Exists": true,
                "Length": "390144",
                "Level": 1,
                "MajorVersion": 1,
                "MinorVersion": 0,
                "Name": "FILENAME.xls",
                "ServerRelativeUrl": "Documents/FILENAME.xls",
                "TimeCreated": "2013-07-10T13:55:39Z",
                "TimeLastModified": "2013-07-10T13:55:39Z",
                "Title": "",
                "UIVersion": 512,
                "UIVersionLabel": "1.0"
            }
        ]
    },
    "ListItemAllFields": {
        "__deferred": {
            "uri": "https://SHAREPOINT_URL/_api/Web/GetFolderByServerRelativeUrl('Documents')/ListItemAllFields"
        }
    },
    "ParentFolder": {
        "__deferred": {
            "uri": "https://SHAREPOINT_URL/_api/Web/GetFolderByServerRelativeUrl('Documents')/ParentFolder"
        }
    },
    "Properties": {
        "__deferred": {
            "uri": "https://SHAREPOINT_URL/_api/Web/GetFolderByServerRelativeUrl('Documents')/Properties"
        }
    },
    "Folders": {
        "__deferred": {
            "uri": "https://SHAREPOINT_URL/_api/Web/GetFolderByServerRelativeUrl('Documents')/Folders"
        }
    },
    "ItemCount": 18,
    "Name": "Documents",
    "ServerRelativeUrl": "Documents",
    "WelcomePage": ""
}

}

bumped to the homepage by Community 22 hours ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

1

Umh, afaik you cant get more than that without requesting the listitem.

_api/web/lists/getbytitle('Documents')/items?$expand=Author&$select=Author/FirstName,Author/Id,Author/LastName

Props:

Title

Name

EMail

MobilePhone

SipAddress

Department

JobTitle

FirstName

LastName

WorkPhone

UserName

Office

ID

Modified

Created

ImnName

NameWithPicture

NameWithPictureAndDetails

ContentTypeDisp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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