Active directory user log in

Active directory user log in

  
I am working on a module which is using the Active Directory Integration. If the user logs in with the active directory credentials, the username field in table of the webpage is populeted with Domain\username (eg: ABC\username , where ABC is the domain name). I am new to outsystems and the module I am working on.

I have a new requirement where the I need to select the fields where the username doesnot start with "ABC\". I tried to create the below query but it is not working.It is pulling all the records from the User, but I need the records only if the username that doesnot starts "ABC\". I am not sure how the ABC\ gets added to the username.
SELECT {User}.[Id],
       {User}.[Name],
       {User}.[Email],
       {User}.[Username]
FROM {User}
WHERE {User}.[Tenant_Id] = @TenantId AND {User}.[Username] NOT LIKE 'ABC\\\\%_' 
I tried to filter with respect to the email address as  below it is working fine
SELECT {User}.[Id],
       {User}.[Name],
       {User}.[Email],
       {User}.[Username]
FROM {User}
WHERE {User}.[Tenant_Id] = @TenantId AND {User}.[Email] NOT LIKE '_%@abc.com' 

Please help me with this. Thank you
Just the below query worked

SELECT {User}.[Id],
       {User}.[Name],
       {User}.[Email],
       {User}.[Username]
FROM {User}
WHERE {User}.[Tenant_Id] = @TenantId AND {User}.[Username] NOT LIKE 'ABC\%_' 
Beware that they may also log in by using AD number instead of the email address. I had many problems because of that dual process.

I only noticed it in version 9. It hadn't happened previously.