From cf62ced13f568d901457c318bf652030346c7f3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Semple=20=F0=9F=94=A5=F0=9F=A7=91=E2=80=8D?= =?UTF-8?q?=F0=9F=92=BB?= Date: Wed, 18 Jan 2023 15:51:31 +0000 Subject: [PATCH 1/2] fix bug where emails with plus (+) symbol fail to sync --- .../source-code/AADB2C.GraphService/B2CGraphClient.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pre-migration/source-code/AADB2C.GraphService/B2CGraphClient.cs b/pre-migration/source-code/AADB2C.GraphService/B2CGraphClient.cs index b045d23..482cf67 100644 --- a/pre-migration/source-code/AADB2C.GraphService/B2CGraphClient.cs +++ b/pre-migration/source-code/AADB2C.GraphService/B2CGraphClient.cs @@ -119,9 +119,10 @@ public async Task CreateAccount( /// public async Task SearcUserBySignInNames(string signInNames) { - return await SendGraphRequest("/users/", - $"$filter=signInNames/any(x:x/value eq '{signInNames}')", - null, HttpMethod.Get); + var signInNamesEncoded = HttpUtility.UrlEncode(signInNames); + return GraphAccounts.Parse(await SendGraphRequest("/users/", + $"$filter=signInNames/any(x:x/value eq '{signInNamesEncoded}')", + null, HttpMethod.Get)); } /// From b7fdcaf3b4c6dbfe8cc9d4598f1d96b252f62769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Semple=20=F0=9F=94=A5=F0=9F=A7=91=E2=80=8D?= =?UTF-8?q?=F0=9F=92=BB?= Date: Wed, 18 Jan 2023 15:55:54 +0000 Subject: [PATCH 2/2] remove incorrect Parse --- .../source-code/AADB2C.GraphService/B2CGraphClient.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pre-migration/source-code/AADB2C.GraphService/B2CGraphClient.cs b/pre-migration/source-code/AADB2C.GraphService/B2CGraphClient.cs index 482cf67..19336f3 100644 --- a/pre-migration/source-code/AADB2C.GraphService/B2CGraphClient.cs +++ b/pre-migration/source-code/AADB2C.GraphService/B2CGraphClient.cs @@ -120,9 +120,9 @@ public async Task CreateAccount( public async Task SearcUserBySignInNames(string signInNames) { var signInNamesEncoded = HttpUtility.UrlEncode(signInNames); - return GraphAccounts.Parse(await SendGraphRequest("/users/", + return await SendGraphRequest("/users/", $"$filter=signInNames/any(x:x/value eq '{signInNamesEncoded}')", - null, HttpMethod.Get)); + null, HttpMethod.Get); } ///