Autodiscover redirect problem with TargetAddress attribute when using local autodiscover XML

We are migrating from on-premises Exchange 2010 to Office 365 for email domain

In theory: When a mailbox moves, the TargetAddress attribute in ActiveDir is set to This redirects autodiscover to the new (Office 365) server. So when setting up a profile, Outlook goes to the on-prem server and from there redirects to Office 365:
- Outlook autodiscovers and ends up at the on-premises server
- TargetAddress attribute informs of new location
- Outlook autodiscovers and ends up at Office 365
- Mailbox is found and Outlook is configured

In practice: We cannot setup Outlook. Instead we receive a pop up "The action cannot be completed"

The problem is that we are using local autodiscover XML file for If I remove the local XML, everything works fine. However I thought that the local file will only affect the first step of the process. How come subsequent steps also get thrown off? Anything ideas how to remedy this?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Simon Butler (Sembee)ConsultantCommented:
Why are you using a local XML file?
That overrides everything else. The only remedy I am aware of would be to remove that file.

criskritAuthor Commented:
The local XML is per-domain. I have a local XML for but not for Shouldn't the latter autodiscover properly?
Simon Butler (Sembee)ConsultantCommented:
Why are you using a local XML file?
The only reason for doing so is when you are sharing the domain with another unrelated Exchange server. Otherwise they just get in the way.

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

criskritAuthor Commented:
We have a multi-forest environment with two completely unrelated Windows domains sharing the same Email domain namespace. Hence we have the local XML.
Simon Butler (Sembee)ConsultantCommented:
I think the only way you can resolve this is by removing the XML file as you have found. I cannot think of any other way of correcting the issue.
The best people to ask though are Office365 support - they will be able to confirm, but I suspect that they will say the same thing.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
criskritAuthor Commented:
Indeed removing the local XML seems to be the only way.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.