0 votes

Hello,

I am currently using a Hybrid Model for AD. The on-premise username is different to compared to Office 365 accounts.

For example:
on-premise: john.smith@navy.com
365: js@365navy.com (user chooses)
So I basically need to use a custom attribute (most likely e-mail address is the best one) for the 365 UPN. What is the best way to go about setting it up using Adaxes?

by (90 points)

1 Answer

0 votes
by (90 points)
selected by
Best answer

More or less I kind of figured it out on my own. I use the following powershell script to just rename the user after it gets created in 365.

Import-Module MSOnline
$o365ObjectIdBinary = $Context.TargetObject.Get("adm-O365ObjectId")
$o365ObjectId = New-Object "System.Guid" @(,$o365ObjectIdBinary)
Set-MsolUserPrincipalName -ObjectId $o365ObjectId  -NewUserPrincipalName "%mail%"
0

Hello,

That's exactly what we'd recommend doing in your case.

Related questions

0 votes
1 answer

Hi, We encounter an error on one of our Adaxes service (Adaxes 2016 3.7.13430) when activating Licence for new user : Softerra.Adaxes.CommandPipeline.CommandProcessingException: The ... stack trace --- Any idea ? Thank you in advance for your help regards

asked Sep 20, 2017 by smasset (740 points)
0 votes
1 answer

I am getting the following error within Adaxes when I try to connect to my Office 365 tenant or run any powershell scripts against it. Failed to create an Office ... .Runspaces.InitialSessionState' threw an exception. Does anybody have a solution for this :?:

asked Jun 17, 2015 by rmedeiros (380 points)
0 votes
1 answer

Hi, I am trying to create a mailbox during a business rule and setting the usageLocation of user to "UK". However this is failing .... If I try to edit user via Adaxes and ... -directory/ Is this a known error? We are running on version 3.16.21515.0 (64 bit)

asked Sep 29, 2023 by wintec01 (1.1k points)
0 votes
1 answer

I noticed that I get an error when I execute the "https://www.adaxes.com/script-repository/add-user-to-groups-in-microsoft-365-s578.htm, Add user to groups in Microsoft ... target address) Since it takes so long to sync, I cannot automate the above steps.

asked May 25, 2022 by Tfarmer (160 points)
0 votes
1 answer

I am trying to automate some of my o365 scripts so that the helpdesk can run them with elevated permissions and not have that ... -Credential $o365Credentials -Authentication Basic -AllowRedirection Import-PSSession $session -AllowClobber -DisableNameChecking

asked Nov 23, 2018 by jbadry (430 points)
3,351 questions
3,052 answers
7,791 comments
545,079 users