Import Relationship attribute in user profile and managed object

Hello Everyone,
My greeting to our lovely community!!
Reaching out to understand if anyone has migrated the relationship attributes like roles, applications, adminofOrg etc in user profile as part of migration process? If yes can someone please share sample transformation script that was used.

Thank You!
Shiv