Jump to content

User Principal Name field


Llyr

Recommended Posts

Hi,

As we continue to work on automating our New starter process we where wondering is it possible to expose the "User Principal Name" attribute in ITOM so that we can format it correctly.

Thanks

Llyr

Link to comment
Share on other sites

Hi Josh

When a user is created in ITOM, the user picks up the default domain, so if domain was @randomdomain.internal the user's UPN defaults to user.name@randomdomain.internal - however, we then need to edit out UPN to be something different, so we'd like to be able to specify that through ITOM at the point of creation (in Powershell this is specified by using the -userprincipalname switch on the New-ADUser command).

 

Cheers

Llyr

Link to comment
Share on other sites

Hi Llyr,

Thank you for your patience while I looked in to implementing this change. Unfortunately when testing sending the UPN without the domain using the New-ADUser function for Active Directory I found that it would not accept the values passed to it if not formatted with the domain. This is confirmed in the documentation here https://learn.microsoft.com/en-us/powershell/module/activedirectory/set-aduser?view=windowsserver2022-ps

I will have a chat with Steve once he's back from holiday about any possible work arounds and get back to you with anything we come up with. 

Please let me know if you have any further questions regarding this.

Best regards,

Josh

Link to comment
Share on other sites

  • 2 weeks later...

Hi Josh, thanks for the reply.

To be clear, we'd like the pass the whole UPN in the script, so the "user name" followed by the domain - so in ITOM we'd like a field to add a UPN, and and populate it with something like "firstname.surname@somedomain.co.uk" which would get passed throuygh ITOM to the script - we currently have a PS script which does this:

$upn = "firstname.surname@somedomain.co.uk"

New-ADUser -Name $DetailedName -SamAccountName $SAM -UserPrincipalName $UPN

Thanks,

Gareth

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...