NOTICE: Significant community changes coming soon
The header menu and the home page on our community will be changing soon. Get more information HERE.
Highlighted
Absent Member.
Absent Member.
270 views

Construct the Dirxml-Associations value from the AD GUID

How can i construct the Dirxml-Associations value for an user object using the AD GUID of the user. This is necessary to construct the LDIF. There was a cool solution link which i followed earlier in 2015 which I couldn't find any more.

Please help
Labels (1)
0 Likes
2 Replies
Highlighted
Knowledge Partner
Knowledge Partner

pappa recd1 wrote:

>
> How can i construct the Dirxml-Associations value for an user object
> using the AD GUID of the user.


Here's an ECMAscript converting the other way round that you might be able to
"invert" for your needs:

function adAssoc2GUID(assoc)
{
var assoc = new java.lang.String(assoc);
if (assoc.matches('(?i)[0-9A-Z]{32}')) {
return assoc.substr( 6,2) +
assoc.substr( 4,2) +
assoc.substr( 2,2) +
assoc.substr( 0,2) +
'-' +
assoc.substr(10,2) +
assoc.substr( 8,2) +
'-' +
assoc.substr(14,2) +
assoc.substr(12,2) +
'-' +
assoc.substr(16,4) +
'-' +
assoc.substr(20);
} else {
return assoc;
}
}


--
http://www.is4it.de/en/solution/identity-access-management/

(If you find this post helpful, please click on the star below.)
______________________________________________
https://www.is4it.de/identity-access-management
0 Likes
Highlighted
Absent Member.
Absent Member.

Thanks a lot. I will check and let you know the results.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.