Everton1878 Posted April 16 Share Posted April 16 Hi, I'm looking to get the h_owned_by field populated for mobile phones from our Intune environment However, userDisplayName give "Firstname Lastname" and userPrincipalName gives the email address of the user Is it possible in the json file to trim userPrincipalName to give the name part before the @ symbol? That would then match with our Hornbill user IDs and populate the name Thanks Link to comment Share on other sites More sharing options...
SamS Posted April 16 Share Posted April 16 Hi @Everton1878, You might be able to use the HornbillUserIDColumn property in the configuration file: https://docs.hornbill.com/data-imports-guide/assets/configuration 1 Link to comment Share on other sites More sharing options...
Everton1878 Posted April 16 Author Share Posted April 16 Perfect Link to comment Share on other sites More sharing options...
Steve G Posted April 16 Share Posted April 16 Hi @Everton1878, The asset import template functionality supports all the functions available in the Sprig template package, so you could use the trimSuffix, replace, regex etc functions to manipulate your data at template level: https://masterminds.github.io/sprig/strings.html An example of using replace could be: "h_owned_by": "{{ .userPrincipalName | replace "@yourdomainname.onmicrosoft.com" "" }}", This would remove @yourdomainname.onmicrosoft.com from the userPrincipalName being mapped into your target field. Hope this helps, Steve 1 Link to comment Share on other sites More sharing options...
Everton1878 Posted April 17 Author Share Posted April 17 thanks @Steve G Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now