Office365 创建包含查找字段的列表项

Office365 创建包含查找字段的列表项,office365,microsoft-graph-api,sharepoint-online,Office365,Microsoft Graph Api,Sharepoint Online,我正在尝试复制使用MS graph的SP REST API的请求: POSThttps://.../_api/web/lists/getbytitle(“…”)/项目 { “PSAuthorId”:“someId”, “PSAuthorlabel”:“…”, “PSApproverId”:“someId”, “PSAPPPROVERABEL”:“…” ... } PSAuthorId和PSApproverId是图形返回的查找字段,如PSAuthorLookupId,psappropid 当我尝

我正在尝试复制使用MS graph的SP REST API的请求:

POSThttps://.../_api/web/lists/getbytitle(“…”)/项目
{
“PSAuthorId”:“someId”,
“PSAuthorlabel”:“…”,
“PSApproverId”:“someId”,
“PSAPPPROVERABEL”:“…”
...
}
PSAuthorId
PSApproverId
是图形返回的查找字段,如
PSAuthorLookupId
psappropid

当我尝试通过Microsoft Graph添加
ListItem
时:

https://graph.microsoft.com/v1.0/sites/.../lists/.../items

{
  "fields": 
  {
     "PSAuthorId": "someid",
     "PSAuthorlabel": "...",
     "PSApproverlabel": "..."
  }
}
我得到了这个错误:

{
“错误”:{
“代码”:“invalidRequest”,
“消息”:“未识别字段'PSAuthorId'”,
“内部错误”:{
“请求id”:“…”,
“日期”:“2017-11-25T13:42:47”
}
}
}
我从
/v1.0
/beta
端点得到了相同的结果

有没有办法将这些(查找)字段添加到
列表项中

编辑

为了澄清,以下是我使用旧SharePoint Rest API的结果:

GEThttps://.../_api/web/lists/getbytitle(“…”)/项目
{
“d”:{
“结果”:[
{
...
“Id”:71,
“作者”:33,
“社论”:33,
“PSAuthorId”:33,
“PSAuthorStringId”:“33”,
“PSApproverId”:60
}
}
]
}
以下是我与Microsoft Graph API一起使用的结果:

对于查找字段,使用带有#LookupId的GET i ot informations,但对于POST,它表示无法识别字段*


我试过用PSAuthorLookupId,AuthorLookupId,PSAuthorId,PSAuthor.Id。。。但始终存在相同的错误。

当目标字段是用户时,查找字段更新存在问题。希望它现在对你有用

当目标字段是用户时,查找字段更新出现问题。希望它现在对你有用

为了澄清您的场景-您是否希望在项目创建期间向SharePoint列表中添加一个新字段(“PSAuthorId”)?不是真的,PsAuthor是一个包含Id的查找字段,我正在尝试设置查找字段的Id。我用更多信息编辑了我的文章。为了澄清您的情况-您是否希望在项目创建期间向SharePoint列表中添加一个新字段(“PSAuthorId”)?不是真的,PsAuthor是一个包含Id的查找字段,我正在尝试设置查找字段的Id。我用更多的信息编辑了我的文章。
GET https://graph.microsoft.com/v1.0/sites/.../lists/.../items?select=id&expand=fields

{
    "value": [
        {
            "id": "77",
            "fields": {
                ...
                "id": "77",
                "AuthorLookupId": "33",
                "EditorLookupId": "33",
                "PSAuthorLookupId": "33",
                "PSApproverLookupId": "60"
            }
        }
    ]
}