0

我在 MS Graph 中有以下查询:

https://graph.microsoft.com/v1.0/sites/mydomain.sharepoint.com:/sites/widgets:/lists/tasks/items?expand=fields

这将返回如下所示的数据:

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.list)('tasks')/items",
    "value": [
        {
            "@odata.etag": "\"1fa6bd00-6f67-42e1-aef4-58d6df505047,6\"",
            "createdDateTime": "2021-11-22T21:14:16Z",
            "eTag": "\"1fa6bd00-6f67-42e1-aef4-58d6df505047,6\"",
            "id": "1",
            "lastModifiedDateTime": "2021-11-22T22:06:44Z",
            "webUrl": "https://mydomain.sharepoint.com/sites/widgets/Lists/tasks/1_.000",
            "createdBy": {
                "user": {
                    "email": "jdoe@outlook.com",
                    "id": "asdfasdf-b881-48d3-82e7-asdfasdf7777asdf",
                    "displayName": "John Doe"
                }
            },
            "lastModifiedBy": {
                "user": {
                    "email": "jdoe@outlook.com",
                    "id": "asdfasdf-b881-48d3-82e7-asdfasdf7777asdf",
                    "displayName": "John Doe"
                }
            },
            "parentReference": {
                "siteId": "mydomain.sharepoint.com,7777777-409d-4d14-bb21-123123123123,ddddddd-e025-4da2-b662-123123123123123"
            },
            "contentType": {
                "id": "0x0100ECAA128A09881644992125D3E297AE9600B96F1DE7A0041B4DA8EBB94BB10BEAEE",
                "name": "Item"
            },
            "fields@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.list)('tasks')/items('1')/fields/$entity",
            "fields": {
                "@odata.etag": "\"00000f000-6f67-42e1-aef4-555555555,6\"",
                "id": "1",
                "ContentType": "Item",
                "Title": "Prepare article about time travel",
                "Modified": "2021-11-22T22:06:44Z",
                "Created": "2021-11-22T21:14:16Z",
                "AuthorLookupId": "6",
                "EditorLookupId": "6",
                "_UIVersionString": "6.0",
                "Attachments": true,
                "Edit": "",
                "LinkTitleNoMenu": "Prepare article about time travel",
                "LinkTitle": "Prepare article about time travel",
                "ItemChildCount": "0",
                "FolderChildCount": "0",
                "_ComplianceFlags": "",
                "_ComplianceTag": "",
                "_ComplianceTagWrittenTime": "",
                "_ComplianceTagUserId": "",
                "Description": "A super challenging task...",
                "Priority": "Normal",
                "Status": "New",
                "AssignedtoLookupId": "11",
                "DaysOld": "0",
                "Instructions": "More instructions for the student"
            }
        },

问题:

除了查看 AssignedtoLookupId 之外,我实际上还需要查看/过滤基于电子邮件地址或我认为的 UserPrincipalName 字段。当用户登录我的应用程序时,我不希望他们获得整个列表,而只是获得与他们的电子邮件地址匹配的列表项。

所以基本上我需要做的是:(伪代码) https://graph.microsoft.com/v1.0/sites/mydomain.sharepoint.com:/sites/widgets:/lists/tasks/items?expand=fields ?returndata-filtered-by UserPrincipal name='janedoe@hotmail'.com

你能为我指出正确的方向吗?现在,我正在研究扩展“邮件”对象......但我得到了一种我在错误的树上吠叫的感觉。

4

0 回答 0