how to convert the HEX value objectGUID in AD to Base64 to store in service now?

vass2
Mega Expert

Dear All,

I am trying to change the coalesce field in Ldap transformmap from email to ObjectGUID of AD.

The user id in AD is HEX value where as when it comes to Snow it is showing base64,

After doing this the coalesce field is updating only for newly created userid.

For existing userids i want to copy the other objectGUID from AD by changing them HEX value to Base64 value.

 I tried below from communities, but it is not fetching me base64 values.

var strEncodedString = GlideStringUtil.base64Encode('my_string');

GlideStringUtil.base64Decode(strEncodedString);

How to achieve this ? Please give some idea on this.

Regards,

Srinivas.

 

 

3 REPLIES 3

Mike Patel
Tera Sage

Why you want to convert. you can just field directly as is to user record using transform map field maps.

find_real_file.png

vass2
Mega Expert

Hi Mike,

 

I am not changing it. When I coalesce this field it is fetching Hex value from source as Base64 value into target. already half of the records are with base64 value. So the rest I want to export from AD and import into Snow. Now obviously I need to change to base64 values before importing into service now.

 

Thanks

Srinivas.

Himabindu2
Tera Contributor

Hello Vass2

 

Did you get a solution for this, I am currently trying to import Object GUIDs from AD to ServiceNow manually.

 

Please share the solution if you have found one to achieve this.

 

 

Thank you!