LDAP Mapper GUID -> Base64 Auto Conversion


I read that keycloak automatically converts guid mapper to base64;
so I added the mapper like below and keycloak log after the signin showed me that it is converted into base64.

[LDAP Mapper Config]
Mapper Type : user-attribute-ldap-mapper
LDAP Attribute : objectGUID


[Result in the Keycloak Log]

The problem is, it does not match with the value I converted using this site : GUID Converter - Tool Slick
It must be “NdULpPYvtkG3PQiYoPpd1A==”.
When I convert “h9…=” back to guid, it’s “A441D787-D2C9-4802-8B4B-A281589EBEB9”, which is different from the guid I received from the ldap.

So I’m now wondering if keycloak adds some kind of salt or what during the conversion…
Is there any way I can purely convert guid into base64?

1 Like

Oh I think I found the reason.
I thought ObjectGuid = msExchMailboxGuid but guess not.
So it must be like below I guess…?

ObjectGuid : A441D787-D2C9-4802-8B4B-A281589EBEB9
msExchMailboxGuid : a40bd535-2ff6-41b6-b73d-0898a0fa5dd4

Then I want to know how to convert msExchMailboxGuid to base64.
Has anybody tried this?