Я просмотрел другие ответы, в которых была та же проблема, но эти ответы, похоже, не решили эту проблему.Как я могу получить запрос на включение имени автора?Хотя этот запрос возвращает автора в ответе, он не содержит фактических сведений об авторе.
Я что-то упустил в запросе или ему нужно внести некоторые изменения в конфигурацию?
Настройка У нас ADFS настроена на Sharepoint 2013 в Premise.
Конечная точка, с которой я работаю https://SHAREPOINTURL/_api/web/GetFolderByServerRelativeUrl('Documents')?$select=Author/Id,Author/Name,Author/Title,Editor/Id,Editor/Name,Editor/Title,*&$expand=Files/Author,Editor
Ответ
{
"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": ""
}
}