Hi there,
because it’s MS AD upper- or lowercase will not influence the search I guess?!
I would check this value:
uid: 'gitlab' # This should be the attribute, not the value that maps to uid.
I propose you replace it by
uid: 'sAMAccountName'
Have a look here.