Bankesy Posted June 20, 2017 Posted June 20, 2017 Good afternoon I'm going to try and explain this as best I can but apologies if it gets a little complicated: When creating\managing users in AD we have the choice of giving them the suffix of @schoolname.county.sch.uk or @nameoftrust.org.uk What I would like to achieve is being able to change a user from @schoolname...to @nameoftrust... and have Outlook auto discover as it does normally. Currently this is not happening. Now for some reason we have been left with multiple ways of creating users, either using Exchange to setup an Office 365 mailbox which then creates the user in AD simultaneously or creating the user in AD directly which in turn syncs to Office 365. Any advice on best practice here is also welcome but primarily I want to achieve that change of domain above and I just don't know what I'm doing wrong. Thank you
snagrat Posted June 20, 2017 Posted June 20, 2017 Doesn't the auto discover name come from the Mail field rather than the UPN?
Bankesy Posted June 20, 2017 Author Posted June 20, 2017 Just to check we are on the same wavelength here, I'm talking about setting up Outlook after changing the domain not working.
djm968 Posted June 20, 2017 Posted June 20, 2017 I would check your DNS settings for the Domain(s) You need to ensure there is an entry for autodiscover.outlook.com
Bankesy Posted June 21, 2017 Author Posted June 21, 2017 Good evening Thanks for the advice, I think because I am able to change the username in AD to either domain and I know AD syncs to Office 365 I was expecting Office 365 to reflect the change at next sync but this doesn't occur. If I look in Office 365 I can change the user e-mail to either domain but have not tried this simple approach yet as Office 365 tells me that we are AD synced and some changes can only be made in AD. Thank you
snagrat Posted June 21, 2017 Posted June 21, 2017 AD will sync with Office 365 but will use other fields other than the domain. I would ensure the UPN is set correctly, the mail field is set correctly and force a sync
sister_annex Posted June 21, 2017 Posted June 21, 2017 If memory serves you can't just change the UPN of the account and have it replicate to O365. We did this when we first started and had to use Powershell scripts to update the O365 field to match the new UPN When i'm at my desk tomorrow i'll dig my script out see if it is of any use
Bankesy Posted June 22, 2017 Author Posted June 22, 2017 Good morning Yes taking a look at that script would be useful. Thank you
sister_annex Posted June 22, 2017 Posted June 22, 2017 This is the snippet of code that re-arranges our tennant UPNs Hopefully it is useful. Once you change the UPN on the tennant that will be the username that they will need to log in with. Probably best to pop the code in to the powershell ISE shows the comments/ variables a bit better HTH <# Module Imports #> Import-Module MSOnlineImport-Module ActiveDirectory <# Username and Password Setup for MSOL connection #> $Username = "" <# Will be something like [email protected] #> $EncryptedPassword = "" | ConvertTo-SecureString -AsPlainText -Force $MSOLCred = New-Object System.Management.Automation.PSCredential($Username,$EncryptedPassword) <# Perform MSOL Connection #> Write-Host "Connecting to Microsoft online using:" $Username Connect-MsolService -Credential $MSOLCred <# Update all MSOL users with proper UPN (except ADFS Account) #> Write-Host "Updating Users Office 365 UPN to end @" Get-MsolUser -all | Where { <# This bit gets all the users on your tennant that are not the Global admin on your tennant and dont already end in the new UPN #> -Not $_.UserPrincipalName.ToLower().StartsWith(“@”) -and -not $_.UserPrincipalName.ToLower().EndsWith("") } | ForEach { <# This sets all the accounts found above to the new UPN #> Set-MsolUserPrincipalName -ObjectId $_.ObjectId -NewUserPrincipalName ($_.UserPrincipalName.Split(“@”)[0] + “@”) } Write-Host "Process Complete"
rodent43 Posted June 22, 2017 Posted June 22, 2017 Hi, It is in the attributes of the AD account... look for proxyAddress The default email will be in capitals e.g. SMTP:[email protected] Aliases are lower case e.g. smtp:[email protected] Hope that helps
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