AADSTS50011 error when sign in from redirected URL using CNAME

%3CLINGO-SUB%20id%3D%22lingo-sub-965010%22%20slang%3D%22en-US%22%3EAADSTS50011%20error%20when%20sign%20in%20from%20redirected%20URL%20using%20CNAME%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-965010%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20DNS%20(%3CEM%3ECNAME%3C%2FEM%3E)%20to%20redirect%20%3CSTRONG%3Email.mydomain.com%3C%2FSTRONG%3E%20to%20%3CSTRONG%3Eoutlook.office.com%2Fmydomain.com%3C%2FSTRONG%3E%20to%20access%20OWA.%20However%2C%20I%20am%20not%20able%20to%20get%20to%20the%20correct%20page%20every%20time%20I%20access%20%3CSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Fmail.mydomain.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmail.mydomain.com%3C%2FA%3E%3C%2FSTRONG%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20will%20get%20%22%3CEM%3E%3C%2FEM%3E%3C%2FP%3E%3CH2%20id%3D%22toc-hId-1850675327%22%3EOur%20services%20aren't%20available%20right%20now%3C%2FH2%3E%3CP%3EWe're%20working%20to%20restore%20all%20services%20as%20soon%20as%20possible.%20Please%20check%20back%20soon.%3C%2FP%3E%22%20in%20ugly%20text%20format%20form.%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEven%20when%20I%20am%20able%20to%20get%20to%20the%20login%20page%2C%20I%20will%20get%20the%20below%20error%20while%20signing%20in%20with%20my%20credential.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%22%3CEM%3EAADSTS50011%3A%20The%20reply%20url%20specified%20in%20the%20request%20does%20not%20match%20the%20reply%20urls%20configured%20for%20the%20application%3C%2FEM%3E%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThese%20do%20not%20occur%20when%20I%20go%20directly%20to%20%3CSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Foutlook.office.com%2Fmydomain.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Foutlook.office.com%2Fmydomain.com%3C%2FA%3E%3C%2FSTRONG%3E.%20I%20had%20tried%20configuring%20Redirect%20URIs%20in%20AAD%20as%20mentioned%20in%20numerous%20blogs%20and%20forums%20but%20doesn't%20seems%20to%20help.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EIs%20using%20CNAME%20to%20redirect%20my%20domain%20URL%20to%20O365%20supported%20by%20Microsoft%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EPlease%20help.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThanks%20in%20advance.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-965010%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Frequent Visitor

Hi,

 

I am using DNS (CNAME) to redirect mail.mydomain.com to outlook.office.com/mydomain.com to access OWA. However, I am not able to get to the correct page every time I access https://mail.mydomain.com.

 

I will get "<h2>Our services aren't available right now</h2><p>We're working to restore all services as soon as possible. Please check back soon.</p>" in ugly text format form.

 

Even when I am able to get to the login page, I will get the below error while signing in with my credential.

 

"AADSTS50011: The reply url specified in the request does not match the reply urls configured for the application"

 

These do not occur when I go directly to https://outlook.office.com/mydomain.com. I had tried configuring Redirect URIs in AAD as mentioned in numerous blogs and forums but doesn't seems to help.

 

Is using CNAME to redirect my domain URL to O365 supported by Microsoft?

 

Please help.

 

Thanks in advance.