diff --git a/pre-migration/source-code/AADB2C.GraphService/B2CGraphClient.cs b/pre-migration/source-code/AADB2C.GraphService/B2CGraphClient.cs index b045d23..19336f3 100644 --- a/pre-migration/source-code/AADB2C.GraphService/B2CGraphClient.cs +++ b/pre-migration/source-code/AADB2C.GraphService/B2CGraphClient.cs @@ -119,8 +119,9 @@ public async Task CreateAccount( /// public async Task SearcUserBySignInNames(string signInNames) { + var signInNamesEncoded = HttpUtility.UrlEncode(signInNames); return await SendGraphRequest("/users/", - $"$filter=signInNames/any(x:x/value eq '{signInNames}')", + $"$filter=signInNames/any(x:x/value eq '{signInNamesEncoded}')", null, HttpMethod.Get); }