From cec6895cccaa3afdc23b1c0fa04af63eb5807a4b Mon Sep 17 00:00:00 2001 From: andres Date: Thu, 30 Jul 2026 22:18:38 +0200 Subject: [PATCH 1/4] Using filter for users --- docs/sources/microsoft-365/msft-onedrive/msft-onedrive.yaml | 1 + .../microsoft-365/msft-onedrive/msft-onedrive_no-app-ids.yaml | 1 + .../test/java/co/worklytics/psoxy/rules/msft/OneDriveTests.java | 2 ++ .../co/worklytics/psoxy/rules/msft/OneDrive_NoAppIds_Tests.java | 2 ++ 4 files changed, 6 insertions(+) diff --git a/docs/sources/microsoft-365/msft-onedrive/msft-onedrive.yaml b/docs/sources/microsoft-365/msft-onedrive/msft-onedrive.yaml index dce090785..d4608cfd2 100644 --- a/docs/sources/microsoft-365/msft-onedrive/msft-onedrive.yaml +++ b/docs/sources/microsoft-365/msft-onedrive/msft-onedrive.yaml @@ -125,6 +125,7 @@ endpoints: - "$skiptoken" - "$orderby" - "$count" + - "$filter" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/msft-onedrive/msft-onedrive_no-app-ids.yaml b/docs/sources/microsoft-365/msft-onedrive/msft-onedrive_no-app-ids.yaml index ef53010e8..33cdab935 100644 --- a/docs/sources/microsoft-365/msft-onedrive/msft-onedrive_no-app-ids.yaml +++ b/docs/sources/microsoft-365/msft-onedrive/msft-onedrive_no-app-ids.yaml @@ -129,6 +129,7 @@ endpoints: - "$skiptoken" - "$orderby" - "$count" + - "$filter" transforms: - ! jsonPaths: diff --git a/java/core/src/test/java/co/worklytics/psoxy/rules/msft/OneDriveTests.java b/java/core/src/test/java/co/worklytics/psoxy/rules/msft/OneDriveTests.java index 21c69cd5d..130bc550b 100644 --- a/java/core/src/test/java/co/worklytics/psoxy/rules/msft/OneDriveTests.java +++ b/java/core/src/test/java/co/worklytics/psoxy/rules/msft/OneDriveTests.java @@ -33,6 +33,8 @@ public Stream getExamples() { // /v1.0/users - no query params, and with all allowed query params InvocationExample.of(baseEndpoint + "/users", "users.json"), InvocationExample.of(baseEndpoint + "/users?$top=999&$select=id,mail,employeeId,otherMails,proxyAddresses&$skiptoken=abcXYZ123&$orderby=id&$count=true", "users.json"), + // /v1.0/users - $filter, as used to partition user enumeration across parallel jobs by userPrincipalName prefix + InvocationExample.of(baseEndpoint + "/users?$filter=startswith(userPrincipalName,'a')&$top=999&$select=id,mail,employeeId,otherMails,proxyAddresses", "users.json"), // /v1.0/groups - no query params, and with all allowed query params InvocationExample.of(baseEndpoint + "/groups", "groups.json"), InvocationExample.of(baseEndpoint + "/groups?$top=999&$select=id,mail&$skiptoken=abcXYZ123&$orderby=id&$count=true", "groups.json"), diff --git a/java/core/src/test/java/co/worklytics/psoxy/rules/msft/OneDrive_NoAppIds_Tests.java b/java/core/src/test/java/co/worklytics/psoxy/rules/msft/OneDrive_NoAppIds_Tests.java index c8988bb30..2f40c9f4d 100644 --- a/java/core/src/test/java/co/worklytics/psoxy/rules/msft/OneDrive_NoAppIds_Tests.java +++ b/java/core/src/test/java/co/worklytics/psoxy/rules/msft/OneDrive_NoAppIds_Tests.java @@ -35,6 +35,8 @@ public Stream getExamples() { // /v1.0/users - no query params, and with all allowed query params InvocationExample.of(baseEndpoint + "/users", "users.json"), InvocationExample.of(baseEndpoint + "/users?$top=999&$select=id,mail,employeeId,otherMails,proxyAddresses&$skiptoken=abcXYZ123&$orderby=id&$count=true", "users.json"), + // /v1.0/users - $filter, as used to partition user enumeration across parallel jobs by userPrincipalName prefix + InvocationExample.of(baseEndpoint + "/users?$filter=startswith(userPrincipalName,'a')&$top=999&$select=id,mail,employeeId,otherMails,proxyAddresses", "users.json"), // /v1.0/groups - no query params, and with all allowed query params InvocationExample.of(baseEndpoint + "/groups", "groups.json"), InvocationExample.of(baseEndpoint + "/groups?$top=999&$select=id,mail&$skiptoken=abcXYZ123&$orderby=id&$count=true", "groups.json"), From 31f905e0b9908d0d91a7b16a245fbacf8234a834 Mon Sep 17 00:00:00 2001 From: andres Date: Thu, 30 Jul 2026 22:42:14 +0200 Subject: [PATCH 2/4] Updated other MSFT connectors --- .../microsoft-365/entra-id/entra-id.yaml | 1 + .../entra-id/entra-id_no-app-ids.yaml | 1 + .../entra-id/entra-id_no-app-ids_no-orig.yaml | 1 + .../msft-copilot/msft-copilot.yaml | 1 + .../msft-copilot/msft-copilot_no-userIds.yaml | 1 + .../microsoft-365/msft-teams/msft-teams.yaml | 1 + .../msft-teams/msft-teams_no-userIds.yaml | 1 + .../microsoft-365/outlook-cal/outlook-cal.yaml | 1 + .../outlook-cal/outlook-cal_no-app-ids.yaml | 1 + .../outlook-cal_no-app-ids_no-groups.yaml | 1 + .../outlook-mail/outlook-mail.yaml | 1 + .../outlook-mail/outlook-mail_no-app-ids.yaml | 1 + .../outlook-mail_no-app-ids_no-groups.yaml | 1 + .../rules/msft/PrebuiltSanitizerRules.java | 4 ++-- .../psoxy/rules/msft/EntraIDTests.java | 17 +++++++++++++++-- 15 files changed, 30 insertions(+), 4 deletions(-) diff --git a/docs/sources/microsoft-365/entra-id/entra-id.yaml b/docs/sources/microsoft-365/entra-id/entra-id.yaml index fe73087d2..d0dc5eb2e 100644 --- a/docs/sources/microsoft-365/entra-id/entra-id.yaml +++ b/docs/sources/microsoft-365/entra-id/entra-id.yaml @@ -7,6 +7,7 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + - "$filter" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/entra-id/entra-id_no-app-ids.yaml b/docs/sources/microsoft-365/entra-id/entra-id_no-app-ids.yaml index cfaab6058..b3528af0d 100644 --- a/docs/sources/microsoft-365/entra-id/entra-id_no-app-ids.yaml +++ b/docs/sources/microsoft-365/entra-id/entra-id_no-app-ids.yaml @@ -7,6 +7,7 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + - "$filter" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/entra-id/entra-id_no-app-ids_no-orig.yaml b/docs/sources/microsoft-365/entra-id/entra-id_no-app-ids_no-orig.yaml index 94734da6e..ddc2f492b 100644 --- a/docs/sources/microsoft-365/entra-id/entra-id_no-app-ids_no-orig.yaml +++ b/docs/sources/microsoft-365/entra-id/entra-id_no-app-ids_no-orig.yaml @@ -7,6 +7,7 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + - "$filter" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/msft-copilot/msft-copilot.yaml b/docs/sources/microsoft-365/msft-copilot/msft-copilot.yaml index 5921567c9..46cd7c509 100644 --- a/docs/sources/microsoft-365/msft-copilot/msft-copilot.yaml +++ b/docs/sources/microsoft-365/msft-copilot/msft-copilot.yaml @@ -45,6 +45,7 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + - "$filter" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/msft-copilot/msft-copilot_no-userIds.yaml b/docs/sources/microsoft-365/msft-copilot/msft-copilot_no-userIds.yaml index 08b91558a..e1e1f3eaf 100644 --- a/docs/sources/microsoft-365/msft-copilot/msft-copilot_no-userIds.yaml +++ b/docs/sources/microsoft-365/msft-copilot/msft-copilot_no-userIds.yaml @@ -51,6 +51,7 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + - "$filter" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/msft-teams/msft-teams.yaml b/docs/sources/microsoft-365/msft-teams/msft-teams.yaml index 5d47af554..cd6e0f773 100644 --- a/docs/sources/microsoft-365/msft-teams/msft-teams.yaml +++ b/docs/sources/microsoft-365/msft-teams/msft-teams.yaml @@ -285,6 +285,7 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + - "$filter" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/msft-teams/msft-teams_no-userIds.yaml b/docs/sources/microsoft-365/msft-teams/msft-teams_no-userIds.yaml index 38cbc7334..fefb06579 100644 --- a/docs/sources/microsoft-365/msft-teams/msft-teams_no-userIds.yaml +++ b/docs/sources/microsoft-365/msft-teams/msft-teams_no-userIds.yaml @@ -340,6 +340,7 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + - "$filter" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/outlook-cal/outlook-cal.yaml b/docs/sources/microsoft-365/outlook-cal/outlook-cal.yaml index 3e0bbaa52..5b2b75f32 100644 --- a/docs/sources/microsoft-365/outlook-cal/outlook-cal.yaml +++ b/docs/sources/microsoft-365/outlook-cal/outlook-cal.yaml @@ -7,6 +7,7 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + - "$filter" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids.yaml b/docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids.yaml index 596dccf20..c034448c5 100644 --- a/docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids.yaml +++ b/docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids.yaml @@ -7,6 +7,7 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + - "$filter" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids_no-groups.yaml b/docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids_no-groups.yaml index af0e69e6b..8e0cdb9e0 100644 --- a/docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids_no-groups.yaml +++ b/docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids_no-groups.yaml @@ -7,6 +7,7 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + - "$filter" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/outlook-mail/outlook-mail.yaml b/docs/sources/microsoft-365/outlook-mail/outlook-mail.yaml index 6b46e8a89..71b921010 100644 --- a/docs/sources/microsoft-365/outlook-mail/outlook-mail.yaml +++ b/docs/sources/microsoft-365/outlook-mail/outlook-mail.yaml @@ -7,6 +7,7 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + - "$filter" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids.yaml b/docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids.yaml index 02a61163c..9564a2056 100644 --- a/docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids.yaml +++ b/docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids.yaml @@ -7,6 +7,7 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + - "$filter" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids_no-groups.yaml b/docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids_no-groups.yaml index b8a5a4a5b..1ddafd8d2 100644 --- a/docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids_no-groups.yaml +++ b/docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids_no-groups.yaml @@ -7,6 +7,7 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + - "$filter" transforms: - ! jsonPaths: diff --git a/java/core/src/main/java/co/worklytics/psoxy/rules/msft/PrebuiltSanitizerRules.java b/java/core/src/main/java/co/worklytics/psoxy/rules/msft/PrebuiltSanitizerRules.java index c78025e06..f9c847329 100644 --- a/java/core/src/main/java/co/worklytics/psoxy/rules/msft/PrebuiltSanitizerRules.java +++ b/java/core/src/main/java/co/worklytics/psoxy/rules/msft/PrebuiltSanitizerRules.java @@ -85,13 +85,13 @@ public class PrebuiltSanitizerRules { ); static final Endpoint ENTRA_ID_USERS = Endpoint.builder() .pathRegex(ENTRA_ID_REGEX_USERS) - .allowedQueryParams(List.of("$top", "$select", "$skiptoken", "$orderBy", "$count")) + .allowedQueryParams(List.of("$top", "$select", "$skiptoken", "$orderBy", "$count", "$filter")) .transforms(USER_TRANSFORMS) .build(); static final Endpoint ENTRA_ID_USERS_NO_APP_IDS = Endpoint.builder() .pathRegex(ENTRA_ID_REGEX_USERS_BY_PSEUDO) - .allowedQueryParams(List.of("$top", "$select", "$skiptoken", "$orderBy", "$count")) + .allowedQueryParams(List.of("$top", "$select", "$skiptoken", "$orderBy", "$count", "$filter")) .transforms(USER_TRANSFORMS) .build(); diff --git a/java/core/src/test/java/co/worklytics/psoxy/rules/msft/EntraIDTests.java b/java/core/src/test/java/co/worklytics/psoxy/rules/msft/EntraIDTests.java index 393f617a8..c11392d46 100644 --- a/java/core/src/test/java/co/worklytics/psoxy/rules/msft/EntraIDTests.java +++ b/java/core/src/test/java/co/worklytics/psoxy/rules/msft/EntraIDTests.java @@ -100,8 +100,21 @@ void users_select(String endpoint) { @Test void users_filter() { - String endpoint = "https://graph.microsoft.com/v1.0/users?$filter=accountEnabled eq true"; - assertUrlBlocked(endpoint); + String jsonString = asJson(ENTRA_ID_API_EXAMPLES_PATH, "users.json"); + + // $filter, as used to partition user enumeration across parallel jobs by userPrincipalName prefix + String endpoint = "https://graph.microsoft.com/v1.0/users?$filter=startswith(userPrincipalName,'a')"; + + Collection PII = Arrays.asList( + "john@worklytics.onmicrosoft.com", + "Paul Allen" + ); + assertNotSanitized(jsonString, PII); + + String sanitized = this.sanitize(endpoint, jsonString); + + assertPseudonymized(sanitized, "john@worklytics.onmicrosoft.com"); + assertRedacted(sanitized, "Paul Allen"); } @Test From df0b1dd99fdccbd46d5fe532e41748a2c8ce105e Mon Sep 17 00:00:00 2001 From: andres Date: Thu, 30 Jul 2026 23:56:14 +0200 Subject: [PATCH 3/4] Fixing consistencyLevel support --- docs/sources/microsoft-365/entra-id/entra-id.yaml | 6 ++++++ .../microsoft-365/entra-id/entra-id_no-app-ids.yaml | 6 ++++++ .../entra-id/entra-id_no-app-ids_no-orig.yaml | 6 ++++++ .../microsoft-365/msft-copilot/msft-copilot.yaml | 2 ++ .../msft-copilot/msft-copilot_no-userIds.yaml | 2 ++ .../sources/microsoft-365/msft-teams/msft-teams.yaml | 4 ++++ .../msft-teams/msft-teams_no-userIds.yaml | 4 ++++ .../microsoft-365/outlook-cal/outlook-cal.yaml | 6 ++++++ .../outlook-cal/outlook-cal_no-app-ids.yaml | 6 ++++++ .../outlook-cal_no-app-ids_no-groups.yaml | 2 ++ .../microsoft-365/outlook-mail/outlook-mail.yaml | 8 ++++++++ .../outlook-mail/outlook-mail_no-app-ids.yaml | 8 ++++++++ .../outlook-mail_no-app-ids_no-groups.yaml | 4 ++++ .../psoxy/rules/msft/PrebuiltSanitizerRules.java | 12 ++++++++++++ 14 files changed, 76 insertions(+) diff --git a/docs/sources/microsoft-365/entra-id/entra-id.yaml b/docs/sources/microsoft-365/entra-id/entra-id.yaml index d0dc5eb2e..eba4c45dd 100644 --- a/docs/sources/microsoft-365/entra-id/entra-id.yaml +++ b/docs/sources/microsoft-365/entra-id/entra-id.yaml @@ -8,6 +8,8 @@ endpoints: - "$orderBy" - "$count" - "$filter" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -45,6 +47,8 @@ endpoints: - "$..identities[*].issuerAssignedId" encoding: "URL_SAFE_TOKEN" - pathRegex: "^/v1.0/groups/?[^/]*" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -77,6 +81,8 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/entra-id/entra-id_no-app-ids.yaml b/docs/sources/microsoft-365/entra-id/entra-id_no-app-ids.yaml index b3528af0d..836364ddd 100644 --- a/docs/sources/microsoft-365/entra-id/entra-id_no-app-ids.yaml +++ b/docs/sources/microsoft-365/entra-id/entra-id_no-app-ids.yaml @@ -8,6 +8,8 @@ endpoints: - "$orderBy" - "$count" - "$filter" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -50,6 +52,8 @@ endpoints: includeReversible: true encoding: "URL_SAFE_TOKEN" - pathRegex: "^/v1.0/groups/?[^/]*" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -82,6 +86,8 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/entra-id/entra-id_no-app-ids_no-orig.yaml b/docs/sources/microsoft-365/entra-id/entra-id_no-app-ids_no-orig.yaml index ddc2f492b..9dcca4400 100644 --- a/docs/sources/microsoft-365/entra-id/entra-id_no-app-ids_no-orig.yaml +++ b/docs/sources/microsoft-365/entra-id/entra-id_no-app-ids_no-orig.yaml @@ -8,6 +8,8 @@ endpoints: - "$orderBy" - "$count" - "$filter" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -50,6 +52,8 @@ endpoints: includeReversible: true encoding: "URL_SAFE_TOKEN" - pathRegex: "^/(v1.0|beta)/groups/?[^/]*" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -86,6 +90,8 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/msft-copilot/msft-copilot.yaml b/docs/sources/microsoft-365/msft-copilot/msft-copilot.yaml index 46cd7c509..1edf4b806 100644 --- a/docs/sources/microsoft-365/msft-copilot/msft-copilot.yaml +++ b/docs/sources/microsoft-365/msft-copilot/msft-copilot.yaml @@ -46,6 +46,8 @@ endpoints: - "$orderBy" - "$count" - "$filter" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/msft-copilot/msft-copilot_no-userIds.yaml b/docs/sources/microsoft-365/msft-copilot/msft-copilot_no-userIds.yaml index e1e1f3eaf..2096bd866 100644 --- a/docs/sources/microsoft-365/msft-copilot/msft-copilot_no-userIds.yaml +++ b/docs/sources/microsoft-365/msft-copilot/msft-copilot_no-userIds.yaml @@ -52,6 +52,8 @@ endpoints: - "$orderBy" - "$count" - "$filter" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/msft-teams/msft-teams.yaml b/docs/sources/microsoft-365/msft-teams/msft-teams.yaml index cd6e0f773..d9842d4c6 100644 --- a/docs/sources/microsoft-365/msft-teams/msft-teams.yaml +++ b/docs/sources/microsoft-365/msft-teams/msft-teams.yaml @@ -37,6 +37,8 @@ endpoints: - "$filter" - "$orderby" - "$expand" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -286,6 +288,8 @@ endpoints: - "$orderBy" - "$count" - "$filter" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/msft-teams/msft-teams_no-userIds.yaml b/docs/sources/microsoft-365/msft-teams/msft-teams_no-userIds.yaml index fefb06579..37e410db9 100644 --- a/docs/sources/microsoft-365/msft-teams/msft-teams_no-userIds.yaml +++ b/docs/sources/microsoft-365/msft-teams/msft-teams_no-userIds.yaml @@ -40,6 +40,8 @@ endpoints: - "$..['@odata.type']" - "$..['@odata.count']" - pathRegex: "^/v1.0/users(/p~[a-zA-Z0-9_-]+?)?[^/]*/chats(\\?.*)?" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -341,6 +343,8 @@ endpoints: - "$orderBy" - "$count" - "$filter" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/outlook-cal/outlook-cal.yaml b/docs/sources/microsoft-365/outlook-cal/outlook-cal.yaml index 5b2b75f32..d8be8bfb0 100644 --- a/docs/sources/microsoft-365/outlook-cal/outlook-cal.yaml +++ b/docs/sources/microsoft-365/outlook-cal/outlook-cal.yaml @@ -8,6 +8,8 @@ endpoints: - "$orderBy" - "$count" - "$filter" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -45,6 +47,8 @@ endpoints: - "$..identities[*].issuerAssignedId" encoding: "URL_SAFE_TOKEN" - pathRegex: "^/v1.0/groups/?[^/]*" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -77,6 +81,8 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids.yaml b/docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids.yaml index c034448c5..e6763c3a9 100644 --- a/docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids.yaml +++ b/docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids.yaml @@ -8,6 +8,8 @@ endpoints: - "$orderBy" - "$count" - "$filter" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -50,6 +52,8 @@ endpoints: includeReversible: true encoding: "URL_SAFE_TOKEN" - pathRegex: "^/v1.0/groups/?[^/]*" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -82,6 +86,8 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids_no-groups.yaml b/docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids_no-groups.yaml index 8e0cdb9e0..e664cb4a3 100644 --- a/docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids_no-groups.yaml +++ b/docs/sources/microsoft-365/outlook-cal/outlook-cal_no-app-ids_no-groups.yaml @@ -8,6 +8,8 @@ endpoints: - "$orderBy" - "$count" - "$filter" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/outlook-mail/outlook-mail.yaml b/docs/sources/microsoft-365/outlook-mail/outlook-mail.yaml index 71b921010..e0b149339 100644 --- a/docs/sources/microsoft-365/outlook-mail/outlook-mail.yaml +++ b/docs/sources/microsoft-365/outlook-mail/outlook-mail.yaml @@ -8,6 +8,8 @@ endpoints: - "$orderBy" - "$count" - "$filter" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -45,6 +47,8 @@ endpoints: - "$..identities[*].issuerAssignedId" encoding: "URL_SAFE_TOKEN" - pathRegex: "^/v1.0/groups/?[^/]*" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -77,6 +81,8 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -136,6 +142,8 @@ endpoints: - "$..emailAddress.address" encoding: "URL_SAFE_TOKEN" - pathRegex: "^/v1.0/users/[^/]*/mailFolders(/SentItems|\\('SentItems'\\))/messages.*" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids.yaml b/docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids.yaml index 9564a2056..7da282bf9 100644 --- a/docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids.yaml +++ b/docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids.yaml @@ -8,6 +8,8 @@ endpoints: - "$orderBy" - "$count" - "$filter" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -50,6 +52,8 @@ endpoints: includeReversible: true encoding: "URL_SAFE_TOKEN" - pathRegex: "^/v1.0/groups/?[^/]*" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -82,6 +86,8 @@ endpoints: - "$skiptoken" - "$orderBy" - "$count" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -156,6 +162,8 @@ endpoints: - "$..['@odata.context']" - pathRegex: "^/v1.0/users(/p~[a-zA-Z0-9_-]+?)?[^/]*/mailFolders(/SentItems|\\('SentItems'\\\ ))/messages.*" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: diff --git a/docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids_no-groups.yaml b/docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids_no-groups.yaml index 1ddafd8d2..6d51e8de8 100644 --- a/docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids_no-groups.yaml +++ b/docs/sources/microsoft-365/outlook-mail/outlook-mail_no-app-ids_no-groups.yaml @@ -8,6 +8,8 @@ endpoints: - "$orderBy" - "$count" - "$filter" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: @@ -83,6 +85,8 @@ endpoints: - "$..['@odata.context']" - pathRegex: "^/v1.0/users(/p~[a-zA-Z0-9_-]+?)?[^/]*/mailFolders(/SentItems|\\('SentItems'\\\ ))/messages.*" + allowedRequestHeaders: + - "ConsistencyLevel" transforms: - ! jsonPaths: diff --git a/java/core/src/main/java/co/worklytics/psoxy/rules/msft/PrebuiltSanitizerRules.java b/java/core/src/main/java/co/worklytics/psoxy/rules/msft/PrebuiltSanitizerRules.java index f9c847329..b7e644b00 100644 --- a/java/core/src/main/java/co/worklytics/psoxy/rules/msft/PrebuiltSanitizerRules.java +++ b/java/core/src/main/java/co/worklytics/psoxy/rules/msft/PrebuiltSanitizerRules.java @@ -15,11 +15,15 @@ import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; public class PrebuiltSanitizerRules { + // required by Graph API for `$filter`/`$search`/`$count` "advanced query" support on directory listings + static final Set CONSISTENCY_LEVEL_HEADER = Set.of("ConsistencyLevel"); + static final Transform.Tokenize TOKENIZE_ODATA_LINKS = Transform.Tokenize.builder() .jsonPath("$.['@odata.nextLink', '@odata.prevLink', 'sessions@odata.nextLink']") .regex("^https://graph.microsoft.com/v1.0/users/([a-zA-Z0-9_-]+)/.*$") @@ -86,17 +90,20 @@ public class PrebuiltSanitizerRules { static final Endpoint ENTRA_ID_USERS = Endpoint.builder() .pathRegex(ENTRA_ID_REGEX_USERS) .allowedQueryParams(List.of("$top", "$select", "$skiptoken", "$orderBy", "$count", "$filter")) + .allowedRequestHeaders(CONSISTENCY_LEVEL_HEADER) .transforms(USER_TRANSFORMS) .build(); static final Endpoint ENTRA_ID_USERS_NO_APP_IDS = Endpoint.builder() .pathRegex(ENTRA_ID_REGEX_USERS_BY_PSEUDO) .allowedQueryParams(List.of("$top", "$select", "$skiptoken", "$orderBy", "$count", "$filter")) + .allowedRequestHeaders(CONSISTENCY_LEVEL_HEADER) .transforms(USER_TRANSFORMS) .build(); static final Endpoint ENTRA_ID_GROUPS = Endpoint.builder() .pathRegex("^/v1.0/groups/?[^/]*") + .allowedRequestHeaders(CONSISTENCY_LEVEL_HEADER) .transform(PSEUDONYMIZE_PROXY_ADDRESSES) .transform(Transform.Redact.builder() .jsonPath("$..owners") @@ -123,6 +130,7 @@ public class PrebuiltSanitizerRules { static final Endpoint ENTRA_ID_GROUP_MEMBERS = Endpoint.builder() .pathRegex(ENTRA_ID_REGEX_GROUP_MEMBERS) .allowedQueryParams(List.of("$top", "$select", "$skiptoken", "$orderBy", "$count")) + .allowedRequestHeaders(CONSISTENCY_LEVEL_HEADER) .transforms(USER_TRANSFORMS) .build(); @@ -190,6 +198,7 @@ public class PrebuiltSanitizerRules { .build(), Endpoint.builder() .pathRegex(OUTLOOK_MAIL_PATH_REGEX_SENT_MESSAGES) + .allowedRequestHeaders(CONSISTENCY_LEVEL_HEADER) .transform(Transform.Redact.builder() .jsonPath("$..subject") .jsonPath("$..body") @@ -230,6 +239,7 @@ public class PrebuiltSanitizerRules { .build(), Endpoint.builder() .pathRegex(ENTRA_ID_REGEX_USERS_BY_PSEUDO + "/mailFolders(/SentItems|\\('SentItems'\\))/messages.*") + .allowedRequestHeaders(CONSISTENCY_LEVEL_HEADER) .transform(Transform.Redact.builder() .jsonPath("$..subject") .jsonPath("$..body") @@ -464,6 +474,7 @@ public class PrebuiltSanitizerRules { static final Endpoint MS_TEAMS_USERS_CHATS = Endpoint.builder() .pathTemplate(MS_TEAMS_PATH_TEMPLATES_USERS_CHATS) .allowedQueryParams(List.of("$select", "$top", "$skiptoken", "$filter", "$orderby", "$expand")) + .allowedRequestHeaders(CONSISTENCY_LEVEL_HEADER) .transform(MS_TEAMS_TEAMS_DEFAULT_PSEUDONYMIZE) .transform(MS_TEAMS_TEAMS_REDACT) .build(); @@ -583,6 +594,7 @@ public class PrebuiltSanitizerRules { .build()))) .endpoint(Endpoint.builder() .pathRegex(ENTRA_ID_REGEX_USERS_BY_PSEUDO + "/chats(\\?.*)?") + .allowedRequestHeaders(CONSISTENCY_LEVEL_HEADER) .transforms(Arrays.asList(MS_TEAMS_TEAMS_DEFAULT_PSEUDONYMIZE, // id of the chat may contain MSFT user GUIDS Transform.Tokenize.builder() From c9bd9af57f8281fe4bcdec300feea7a064c2274d Mon Sep 17 00:00:00 2001 From: andres Date: Fri, 31 Jul 2026 00:52:54 +0200 Subject: [PATCH 4/4] Onedrive update --- .../msft-onedrive/msft-onedrive.yaml | 354 ++++++++--------- .../msft-onedrive_no-app-ids.yaml | 366 +++++++++--------- 2 files changed, 364 insertions(+), 356 deletions(-) diff --git a/docs/sources/microsoft-365/msft-onedrive/msft-onedrive.yaml b/docs/sources/microsoft-365/msft-onedrive/msft-onedrive.yaml index d4608cfd2..aa123d831 100644 --- a/docs/sources/microsoft-365/msft-onedrive/msft-onedrive.yaml +++ b/docs/sources/microsoft-365/msft-onedrive/msft-onedrive.yaml @@ -1,180 +1,184 @@ --- endpoints: - - pathTemplate: "/v1.0/drives/{driveId}/activities" - allowedQueryParams: - - "$expand" - - "$skiptoken" - transforms: - - ! - jsonPaths: - - "$..user.email" - encoding: "URL_SAFE_TOKEN" - responseSchema: - type: "object" - properties: - '@microsoft.graph.hasMoreData': - type: "boolean" - '@odata.deltaLink': - type: "string" - '@odata.nextLink': - type: "string" - value: - type: "array" - items: - $ref: "#/definitions/ItemActivity" - - pathTemplate: "/v1.0/drives/{driveId}/items/{itemId}/activities" - allowedQueryParams: - - "$expand" - - "$skiptoken" - transforms: - - ! - jsonPaths: - - "$..user.email" - encoding: "URL_SAFE_TOKEN" - responseSchema: - type: "object" - properties: - '@microsoft.graph.hasMoreData': - type: "boolean" - '@odata.deltaLink': - type: "string" - '@odata.nextLink': - type: "string" - value: - type: "array" - items: - $ref: "#/definitions/ItemActivity" - - pathTemplate: "/v1.0/drives/{driveId}/root/delta" - allowedQueryParams: - - "token" - - "$select" - - "$expand" - - "$top" - transforms: - - ! - jsonPaths: - - "$..user.email" - encoding: "URL_SAFE_TOKEN" - responseSchema: - type: "object" - properties: - '@microsoft.graph.hasMoreData': - type: "boolean" - '@odata.deltaLink': - type: "string" - '@odata.nextLink': - type: "string" - value: - type: "array" - items: - $ref: "#/definitions/DriveItem" - - pathTemplate: "/v1.0/groups" - allowedQueryParams: - - "$top" - - "$select" - - "$skiptoken" - - "$orderby" - - "$count" - transforms: - - ! - jsonPaths: - - "$..mail" - encoding: "URL_SAFE_TOKEN" - responseSchema: - type: "object" - properties: - '@microsoft.graph.hasMoreData': - type: "boolean" - '@odata.deltaLink': - type: "string" - '@odata.nextLink': - type: "string" - value: - type: "array" - items: - $ref: "#/definitions/GraphGroup" - - pathTemplate: "/v1.0/groups/{groupId}/drives" - allowedQueryParams: - - "$select" - - "$skiptoken" - - "$top" - - "$orderby" - - "$expand" - transforms: - - ! - jsonPaths: - - "$..user.email" - encoding: "URL_SAFE_TOKEN" - responseSchema: - type: "object" - properties: - '@microsoft.graph.hasMoreData': - type: "boolean" - '@odata.deltaLink': - type: "string" - '@odata.nextLink': - type: "string" - value: - type: "array" - items: - $ref: "#/definitions/Drive" - - pathTemplate: "/v1.0/users" - allowedQueryParams: - - "$top" - - "$select" - - "$skiptoken" - - "$orderby" - - "$count" - - "$filter" - transforms: - - ! - jsonPaths: - - "$..employeeId" - - "$..mail" - - "$..otherMails[*]" - encoding: "URL_SAFE_TOKEN" - - ! - jsonPaths: - - "$..proxyAddresses[*]" - regex: "(?i)^smtp:(.*)$" - responseSchema: - type: "object" - properties: - '@microsoft.graph.hasMoreData': - type: "boolean" - '@odata.deltaLink': - type: "string" - '@odata.nextLink': - type: "string" - value: - type: "array" - items: - $ref: "#/definitions/GraphUser" - - pathTemplate: "/v1.0/users/{userId}/drives" - allowedQueryParams: - - "$select" - - "$skiptoken" - - "$top" - - "$orderby" - - "$expand" - transforms: - - ! - jsonPaths: - - "$..user.email" - encoding: "URL_SAFE_TOKEN" - responseSchema: - type: "object" - properties: - '@microsoft.graph.hasMoreData': - type: "boolean" - '@odata.deltaLink': - type: "string" - '@odata.nextLink': - type: "string" - value: - type: "array" - items: - $ref: "#/definitions/Drive" +- pathTemplate: "/v1.0/drives/{driveId}/activities" + allowedQueryParams: + - "$expand" + - "$skiptoken" + transforms: + - ! + jsonPaths: + - "$..user.email" + encoding: "URL_SAFE_TOKEN" + responseSchema: + type: "object" + properties: + '@microsoft.graph.hasMoreData': + type: "boolean" + '@odata.deltaLink': + type: "string" + '@odata.nextLink': + type: "string" + value: + type: "array" + items: + $ref: "#/definitions/ItemActivity" +- pathTemplate: "/v1.0/drives/{driveId}/items/{itemId}/activities" + allowedQueryParams: + - "$expand" + - "$skiptoken" + transforms: + - ! + jsonPaths: + - "$..user.email" + encoding: "URL_SAFE_TOKEN" + responseSchema: + type: "object" + properties: + '@microsoft.graph.hasMoreData': + type: "boolean" + '@odata.deltaLink': + type: "string" + '@odata.nextLink': + type: "string" + value: + type: "array" + items: + $ref: "#/definitions/ItemActivity" +- pathTemplate: "/v1.0/drives/{driveId}/root/delta" + allowedQueryParams: + - "token" + - "$select" + - "$expand" + - "$top" + transforms: + - ! + jsonPaths: + - "$..user.email" + encoding: "URL_SAFE_TOKEN" + responseSchema: + type: "object" + properties: + '@microsoft.graph.hasMoreData': + type: "boolean" + '@odata.deltaLink': + type: "string" + '@odata.nextLink': + type: "string" + value: + type: "array" + items: + $ref: "#/definitions/DriveItem" +- pathTemplate: "/v1.0/groups" + allowedQueryParams: + - "$top" + - "$select" + - "$skiptoken" + - "$orderby" + - "$count" + allowedRequestHeaders: + - "ConsistencyLevel" + transforms: + - ! + jsonPaths: + - "$..mail" + encoding: "URL_SAFE_TOKEN" + responseSchema: + type: "object" + properties: + '@microsoft.graph.hasMoreData': + type: "boolean" + '@odata.deltaLink': + type: "string" + '@odata.nextLink': + type: "string" + value: + type: "array" + items: + $ref: "#/definitions/GraphGroup" +- pathTemplate: "/v1.0/groups/{groupId}/drives" + allowedQueryParams: + - "$select" + - "$skiptoken" + - "$top" + - "$orderby" + - "$expand" + transforms: + - ! + jsonPaths: + - "$..user.email" + encoding: "URL_SAFE_TOKEN" + responseSchema: + type: "object" + properties: + '@microsoft.graph.hasMoreData': + type: "boolean" + '@odata.deltaLink': + type: "string" + '@odata.nextLink': + type: "string" + value: + type: "array" + items: + $ref: "#/definitions/Drive" +- pathTemplate: "/v1.0/users" + allowedQueryParams: + - "$top" + - "$select" + - "$skiptoken" + - "$orderby" + - "$count" + - "$filter" + allowedRequestHeaders: + - "ConsistencyLevel" + transforms: + - ! + jsonPaths: + - "$..employeeId" + - "$..mail" + - "$..otherMails[*]" + encoding: "URL_SAFE_TOKEN" + - ! + jsonPaths: + - "$..proxyAddresses[*]" + regex: "(?i)^smtp:(.*)$" + responseSchema: + type: "object" + properties: + '@microsoft.graph.hasMoreData': + type: "boolean" + '@odata.deltaLink': + type: "string" + '@odata.nextLink': + type: "string" + value: + type: "array" + items: + $ref: "#/definitions/GraphUser" +- pathTemplate: "/v1.0/users/{userId}/drives" + allowedQueryParams: + - "$select" + - "$skiptoken" + - "$top" + - "$orderby" + - "$expand" + transforms: + - ! + jsonPaths: + - "$..user.email" + encoding: "URL_SAFE_TOKEN" + responseSchema: + type: "object" + properties: + '@microsoft.graph.hasMoreData': + type: "boolean" + '@odata.deltaLink': + type: "string" + '@odata.nextLink': + type: "string" + value: + type: "array" + items: + $ref: "#/definitions/Drive" definitions: ActivityItemRef: type: "object" diff --git a/docs/sources/microsoft-365/msft-onedrive/msft-onedrive_no-app-ids.yaml b/docs/sources/microsoft-365/msft-onedrive/msft-onedrive_no-app-ids.yaml index 33cdab935..70f44cc9d 100644 --- a/docs/sources/microsoft-365/msft-onedrive/msft-onedrive_no-app-ids.yaml +++ b/docs/sources/microsoft-365/msft-onedrive/msft-onedrive_no-app-ids.yaml @@ -1,186 +1,190 @@ --- endpoints: - - pathTemplate: "/v1.0/drives/{driveId}/activities" - allowedQueryParams: - - "$expand" - - "$skiptoken" - transforms: - - ! - jsonPaths: - - "$..user.id" - - "$..user.email" - encoding: "URL_SAFE_TOKEN" - responseSchema: - type: "object" - properties: - '@microsoft.graph.hasMoreData': - type: "boolean" - '@odata.deltaLink': - type: "string" - '@odata.nextLink': - type: "string" - value: - type: "array" - items: - $ref: "#/definitions/ItemActivity" - - pathTemplate: "/v1.0/drives/{driveId}/items/{itemId}/activities" - allowedQueryParams: - - "$expand" - - "$skiptoken" - transforms: - - ! - jsonPaths: - - "$..user.id" - - "$..user.email" - encoding: "URL_SAFE_TOKEN" - responseSchema: - type: "object" - properties: - '@microsoft.graph.hasMoreData': - type: "boolean" - '@odata.deltaLink': - type: "string" - '@odata.nextLink': - type: "string" - value: - type: "array" - items: - $ref: "#/definitions/ItemActivity" - - pathTemplate: "/v1.0/drives/{driveId}/root/delta" - allowedQueryParams: - - "token" - - "$select" - - "$expand" - - "$top" - transforms: - - ! - jsonPaths: - - "$..user.id" - - "$..user.email" - encoding: "URL_SAFE_TOKEN" - responseSchema: - type: "object" - properties: - '@microsoft.graph.hasMoreData': - type: "boolean" - '@odata.deltaLink': - type: "string" - '@odata.nextLink': - type: "string" - value: - type: "array" - items: - $ref: "#/definitions/DriveItem" - - pathTemplate: "/v1.0/groups" - allowedQueryParams: - - "$top" - - "$select" - - "$skiptoken" - - "$orderby" - - "$count" - transforms: - - ! - jsonPaths: - - "$..mail" - encoding: "URL_SAFE_TOKEN" - responseSchema: - type: "object" - properties: - '@microsoft.graph.hasMoreData': - type: "boolean" - '@odata.deltaLink': - type: "string" - '@odata.nextLink': - type: "string" - value: - type: "array" - items: - $ref: "#/definitions/GraphGroup" - - pathTemplate: "/v1.0/groups/{groupId}/drives" - allowedQueryParams: - - "$select" - - "$skiptoken" - - "$top" - - "$orderby" - - "$expand" - transforms: - - ! - jsonPaths: - - "$..user.id" - - "$..user.email" - encoding: "URL_SAFE_TOKEN" - responseSchema: - type: "object" - properties: - '@microsoft.graph.hasMoreData': - type: "boolean" - '@odata.deltaLink': - type: "string" - '@odata.nextLink': - type: "string" - value: - type: "array" - items: - $ref: "#/definitions/Drive" - - pathTemplate: "/v1.0/users" - allowedQueryParams: - - "$top" - - "$select" - - "$skiptoken" - - "$orderby" - - "$count" - - "$filter" - transforms: - - ! - jsonPaths: - - "$..id" - - "$..employeeId" - - "$..mail" - - "$..otherMails[*]" - encoding: "URL_SAFE_TOKEN" - - ! - jsonPaths: - - "$..proxyAddresses[*]" - regex: "(?i)^smtp:(.*)$" - responseSchema: - type: "object" - properties: - '@microsoft.graph.hasMoreData': - type: "boolean" - '@odata.deltaLink': - type: "string" - '@odata.nextLink': - type: "string" - value: - type: "array" - items: - $ref: "#/definitions/GraphUser" - - pathTemplate: "/v1.0/users/{userId}/drives" - allowedQueryParams: - - "$select" - - "$skiptoken" - - "$top" - - "$orderby" - - "$expand" - transforms: - - ! - jsonPaths: - - "$..user.id" - - "$..user.email" - encoding: "URL_SAFE_TOKEN" - responseSchema: - type: "object" - properties: - '@microsoft.graph.hasMoreData': - type: "boolean" - '@odata.deltaLink': - type: "string" - '@odata.nextLink': - type: "string" - value: - type: "array" - items: - $ref: "#/definitions/Drive" +- pathTemplate: "/v1.0/drives/{driveId}/activities" + allowedQueryParams: + - "$expand" + - "$skiptoken" + transforms: + - ! + jsonPaths: + - "$..user.id" + - "$..user.email" + encoding: "URL_SAFE_TOKEN" + responseSchema: + type: "object" + properties: + '@microsoft.graph.hasMoreData': + type: "boolean" + '@odata.deltaLink': + type: "string" + '@odata.nextLink': + type: "string" + value: + type: "array" + items: + $ref: "#/definitions/ItemActivity" +- pathTemplate: "/v1.0/drives/{driveId}/items/{itemId}/activities" + allowedQueryParams: + - "$expand" + - "$skiptoken" + transforms: + - ! + jsonPaths: + - "$..user.id" + - "$..user.email" + encoding: "URL_SAFE_TOKEN" + responseSchema: + type: "object" + properties: + '@microsoft.graph.hasMoreData': + type: "boolean" + '@odata.deltaLink': + type: "string" + '@odata.nextLink': + type: "string" + value: + type: "array" + items: + $ref: "#/definitions/ItemActivity" +- pathTemplate: "/v1.0/drives/{driveId}/root/delta" + allowedQueryParams: + - "token" + - "$select" + - "$expand" + - "$top" + transforms: + - ! + jsonPaths: + - "$..user.id" + - "$..user.email" + encoding: "URL_SAFE_TOKEN" + responseSchema: + type: "object" + properties: + '@microsoft.graph.hasMoreData': + type: "boolean" + '@odata.deltaLink': + type: "string" + '@odata.nextLink': + type: "string" + value: + type: "array" + items: + $ref: "#/definitions/DriveItem" +- pathTemplate: "/v1.0/groups" + allowedQueryParams: + - "$top" + - "$select" + - "$skiptoken" + - "$orderby" + - "$count" + allowedRequestHeaders: + - "ConsistencyLevel" + transforms: + - ! + jsonPaths: + - "$..mail" + encoding: "URL_SAFE_TOKEN" + responseSchema: + type: "object" + properties: + '@microsoft.graph.hasMoreData': + type: "boolean" + '@odata.deltaLink': + type: "string" + '@odata.nextLink': + type: "string" + value: + type: "array" + items: + $ref: "#/definitions/GraphGroup" +- pathTemplate: "/v1.0/groups/{groupId}/drives" + allowedQueryParams: + - "$select" + - "$skiptoken" + - "$top" + - "$orderby" + - "$expand" + transforms: + - ! + jsonPaths: + - "$..user.id" + - "$..user.email" + encoding: "URL_SAFE_TOKEN" + responseSchema: + type: "object" + properties: + '@microsoft.graph.hasMoreData': + type: "boolean" + '@odata.deltaLink': + type: "string" + '@odata.nextLink': + type: "string" + value: + type: "array" + items: + $ref: "#/definitions/Drive" +- pathTemplate: "/v1.0/users" + allowedQueryParams: + - "$top" + - "$select" + - "$skiptoken" + - "$orderby" + - "$count" + - "$filter" + allowedRequestHeaders: + - "ConsistencyLevel" + transforms: + - ! + jsonPaths: + - "$..id" + - "$..employeeId" + - "$..mail" + - "$..otherMails[*]" + encoding: "URL_SAFE_TOKEN" + - ! + jsonPaths: + - "$..proxyAddresses[*]" + regex: "(?i)^smtp:(.*)$" + responseSchema: + type: "object" + properties: + '@microsoft.graph.hasMoreData': + type: "boolean" + '@odata.deltaLink': + type: "string" + '@odata.nextLink': + type: "string" + value: + type: "array" + items: + $ref: "#/definitions/GraphUser" +- pathTemplate: "/v1.0/users/{userId}/drives" + allowedQueryParams: + - "$select" + - "$skiptoken" + - "$top" + - "$orderby" + - "$expand" + transforms: + - ! + jsonPaths: + - "$..user.id" + - "$..user.email" + encoding: "URL_SAFE_TOKEN" + responseSchema: + type: "object" + properties: + '@microsoft.graph.hasMoreData': + type: "boolean" + '@odata.deltaLink': + type: "string" + '@odata.nextLink': + type: "string" + value: + type: "array" + items: + $ref: "#/definitions/Drive" definitions: ActivityItemRef: type: "object"