NAA does not work in Outlook when a custom 365 OWA (Vanity) URL is used
Your Environment
- Platform [PC desktop, Mac, iOS, Office on the web]: PC, OWA
- Host [Excel, Word, PowerPoint, etc.]: Outlook
- Office version number: n/a
- Operating System: Windows
- Browser (if using Office on the web): Chrome
Expected behavior
When using NAA in Outlook we are able to get a token.
Current behavior
So... I realize that this scenario is probably rare as not a lot of 365 tenants seem to have custom/vanity URLs anymore. But...let's say my domain is www.contoso.com and I have 365 setup such that I get to Outlook on the Web via o365.mail.contoso.com.
When I try to use an Outlook Add-in with NAA, the token get fails with a pop that says "The redirect URI https://o365.mail.contoso.com/mail/oauthRedirect.html specified in the request does not match the redirect URIs configured for the application: '9199bf20-a13f-4107-85dc-02114787ef48`. Make sure the redirect URI....
The given appID appears to be for OWA and is NOT the app registration being used by NAA. This redirect happens normally when I use a standard OWA URL and works fine. The error in the console that appears is about monitor_window_timeout. We checked the indicated support doc (https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/errors.md#monitor_window_timeout) but the information here didn't appear to be relevant. We tried setting the redirectUri anyway but this doesn't appear to do anything (I'm guessing because the request is being brokered through Outlook).
Steps to reproduce
- Have custom OWA URL (e.g. mail.yourDomain.com instead of outlook.office.com/mail
- Attempt to get NAA token using normal methods/samples
- The error should pop-up in the window that attempts to get the NAA token via pop-up and console errors should appear
Link to live example(s)
n/a
NAA does not work in Outlook when a custom 365 OWA (Vanity) URL is used
Your Environment
Expected behavior
When using NAA in Outlook we are able to get a token.
Current behavior
So... I realize that this scenario is probably rare as not a lot of 365 tenants seem to have custom/vanity URLs anymore. But...let's say my domain is www.contoso.com and I have 365 setup such that I get to Outlook on the Web via o365.mail.contoso.com.
When I try to use an Outlook Add-in with NAA, the token get fails with a pop that says "The redirect URI https://o365.mail.contoso.com/mail/oauthRedirect.html specified in the request does not match the redirect URIs configured for the application: '9199bf20-a13f-4107-85dc-02114787ef48`. Make sure the redirect URI....
The given appID appears to be for OWA and is NOT the app registration being used by NAA. This redirect happens normally when I use a standard OWA URL and works fine. The error in the console that appears is about monitor_window_timeout. We checked the indicated support doc (https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/errors.md#monitor_window_timeout) but the information here didn't appear to be relevant. We tried setting the redirectUri anyway but this doesn't appear to do anything (I'm guessing because the request is being brokered through Outlook).
Steps to reproduce
Link to live example(s)
n/a