Попытка отфильтровать мои контакты в Outlook 365 с помощью расширений Microsoft Graph. - PullRequest
0 голосов
/ 09 июля 2019

Я пытаюсь связать employeeId (расширение схемы) с моими контактами в outlook, чтобы затем иметь возможность фильтрации с использованием employeeId

Мне удалось создать расширения схемы в контактах

https://graph.microsoft.com/v1.0/me/contacts?$filter=hines_employeeId/employeeId eq '12345'&$select=hines_employeeId

Результат:

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('a83022bc-88e8-4232-85e4-b80bab0e3f56')/contacts(hines_employeeId)",
    "value": [
        {
            "@odata.etag": "W/\"EQAAABYAAAD6J1g3drNdT4/nPVSy7JrwAAAC9CF5\"",
            "id": "AAMkADFkZDNhMDY1LWU3OWQtNDA3YS04YTI0LThmZGZkZTU4ZDdmMQBGAAAAAABQNcFh6AzrTLaCIQxPc_AhBwD6J1g3drNdT4-nPVSy7JrwAAAAAAEOAAD6J1g3drNdT4-nPVSy7JrwAAAC9iuOAAA=",
            "createdDateTime": "2019-07-09T13:31:54Z",
            "lastModifiedDateTime": "2019-07-09T13:32:44Z",
            "changeKey": "EQAAABYAAAD6J1g3drNdT4/nPVSy7JrwAAAC9CF5",
            "categories": [],
            "parentFolderId": "AQMkADFkZAAzYTA2NS1lNzlkLTQwN2EtOGEyNC04ZmRmZGU1OGQ3ZjEALgAAA1A1wWHoDOtMtoIhDE9z4CEBAPonWDd2s11Pj_c9VLLsmvAAAAIBDgAAAA==",
            "birthday": null,
            "fileAs": "",
            "displayName": "test1",
            "givenName": "test1",
            "initials": null,
            "middleName": null,
            "nickName": null,
            "surname": null,
            "title": null,
            "yomiGivenName": null,
            "yomiSurname": null,
            "yomiCompanyName": null,
            "generation": null,
            "imAddresses": [],
            "jobTitle": null,
            "companyName": null,
            "department": null,
            "officeLocation": null,
            "profession": null,
            "businessHomePage": null,
            "assistantName": null,
            "manager": null,
            "homePhones": [],
            "mobilePhone": null,
            "businessPhones": [],
            "spouseName": null,
            "personalNotes": "",
            "children": [],
            "hines_employeeId": {
                "employeeId": "12345"
            },
            "emailAddresses": [],
            "homeAddress": {},
            "businessAddress": {},
            "otherAddress": {}
        },
        {
            "@odata.etag": "W/\"EQAAABYAAAD6J1g3drNdT4/nPVSy7JrwAAAC9CF8\"",
            "id": "AAMkADFkZDNhMDY1LWU3OWQtNDA3YS04YTI0LThmZGZkZTU4ZDdmMQBGAAAAAABQNcFh6AzrTLaCIQxPc_AhBwD6J1g3drNdT4-nPVSy7JrwAAAAAAEOAAD6J1g3drNdT4-nPVSy7JrwAAAC9iuNAAA=",
            "createdDateTime": "2019-07-09T13:30:21Z",
            "lastModifiedDateTime": "2019-07-09T14:58:11Z",
            "changeKey": "EQAAABYAAAD6J1g3drNdT4/nPVSy7JrwAAAC9CF8",
            "categories": [],
            "parentFolderId": "AQMkADFkZAAzYTA2NS1lNzlkLTQwN2EtOGEyNC04ZmRmZGU1OGQ3ZjEALgAAA1A1wWHoDOtMtoIhDE9z4CEBAPonWDd2s11Pj_c9VLLsmvAAAAIBDgAAAA==",
            "birthday": null,
            "fileAs": "",
            "displayName": "test1",
            "givenName": "test1",
            "initials": null,
            "middleName": null,
            "nickName": null,
            "surname": null,
            "title": null,
            "yomiGivenName": null,
            "yomiSurname": null,
            "yomiCompanyName": null,
            "generation": null,
            "imAddresses": [],
            "jobTitle": null,
            "companyName": null,
            "department": null,
            "officeLocation": null,
            "profession": null,
            "businessHomePage": null,
            "assistantName": null,
            "manager": null,
            "homePhones": [],
            "mobilePhone": null,
            "businessPhones": [],
            "spouseName": null,
            "personalNotes": "",
            "children": [],
            "hines_employeeId": {
                "employeeId": "12"
            },
            "emailAddresses": [],
            "homeAddress": {},
            "businessAddress": {},
            "otherAddress": {}
        }
    ]
}

Я использую этот http-вызов для фильтрации контактов:

https://graph.microsoft.com/v1.0/me/contacts?$filter=hines_employeeId/employeeId eq '12345'&$select=hines_employeeId

, и он дает мне такой ответ:

{
    "error": {
        "code": "RequestBroker--ParseUri",
        "message": "Could not find a property named 'e2_eec330f010b5491faac671a62db60b3c_hines_employeeId' on type 'Microsoft.OutlookServices.Contact'.",
        "innerError": {
            "request-id": "cda7f7b5-d00c-425e-a88b-d8397e5e799f",
            "date": "2019-07-09T15:28:09"
        }
    }
}

Я ожидал, что в моих контактах будет один контакт с employeeId "12345", который будет отображаться.

Спасибо за вашу помощь:)

...