【发布时间】:2020-01-03 20:20:38
【问题描述】:
我有一个 Sharepoint Online 列表,其中包含“个人或组”类型的列。我想使用 Microsoft Graph API(最终来自 Teams 机器人)为此类列创建一个新条目。
我的问题是这样的列包含一个查找值,我不知道如何获得这个数字。我可以成功地从 Graph(/me 或 /users)获取用户对象,但返回的对象有一个完全不同的 id。如何将此链接到 Sharepoint Online 所需的内容?
示例:Graph 返回的类型为“Person or Group”的 Sharepoint 列 SG_Responsible(注意报告为 SG_ResponsibleLookupId):
"fields": {
"@odata.etag": "\"e2977d91-fd6d-4141-8bc6-897f5bbe9840,1\"",
"Title": "Test 2",
"SG_ResponsibleLookupId": "12",
"SG_Description": "This is a Test",
...
来自/users的对应用户:
{
"businessPhones": [],
"displayName": "John Doe",
"givenName": null,
"jobTitle": null,
"mail": null,
"mobilePhone": null,
"officeLocation": null,
"preferredLanguage": null,
"surname": null,
"userPrincipalName": "john@example.com",
"id": "76a3b5b7-768b-4dde-ba13-6d471aa2c7fd"
},
那么如何确定这个用户是 Sharepoint 的用户 #12?
【问题讨论】:
标签: microsoft-graph-api sharepoint-online