Skip to content

Commit 344bc3c

Browse files
[Outlook](NAA) add testing guidance to FAQ (#4997)
* add testing guidance * Apply suggestions from code review Co-authored-by: Linda Cannon <[email protected]> * rewrite bug description * fixed heading level * Update docs/outlook/faq-nested-app-auth-outlook-legacy-tokens.md * the 'about' bug no longer applies. --------- Co-authored-by: Linda Cannon <[email protected]>
1 parent b803f5c commit 344bc3c

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

docs/outlook/faq-nested-app-auth-outlook-legacy-tokens.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Nested app authentication and Outlook legacy tokens deprecation FAQ
44
ms.service: microsoft-365
55
ms.subservice: add-ins
66
ms.topic: faq
7-
ms.date: 12/30/2024
7+
ms.date: 01/31/2025
88
---
99

1010
# Nested app authentication and Outlook legacy tokens deprecation FAQ
@@ -208,6 +208,30 @@ const msalConfig = {
208208
};
209209
```
210210

211+
### Test your updated add-in
212+
213+
Once you've updated your add-in to use NAA, you should test it on all platforms you support, such as Mac, mobile, web, and Outlook on Windows.
214+
215+
#### Test when Exchange tokens turned off
216+
217+
To test that your add-in works correctly when Exchange tokens are turned off, deploy your add-in to a tenant with tokens turned off and test it. To turn tokens off, see [Turn legacy Exchange Online tokens on or off](turn-exchange-tokens-on-off.md).
218+
219+
If you've implemented a pattern where your code uses Exchange tokens but then falls over if they are unavailable, be sure you are checking for the correct errors. When a call to get an Exchange token fails, check the [asyncResult.diagnostics](/javascript/api/office/office.asyncresult). If either of the following errors is returned, switch to NAA.
220+
221+
- `GenericTokenError: An internal error has occurred.`
222+
- `InternalServerError: The Exchange server returned an error. Please look at the diagnostics object for more information.`
223+
224+
#### Test fallback code for Trident+ webview
225+
226+
If your Outlook add-in supports Outlook 2016 or Outlook 2019 on Windows, test that it works correctly when the Trident+ (Internet Explorer 11) webview is used. When the Trident+ webview is used, your code must fall back to MSAL v2 to open a dialog and sign in the user. For more information on how to implement the fallback pattern, see [Outlook add-in with SSO using nested app authentication including Internet Explorer fallback](https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/auth/Outlook-Add-in-SSO-NAA-IE).
227+
228+
#### Testing in Trident+ and WebView2
229+
230+
Outlook 2016 and Outlook 2019 on Windows use the Trident+ or WebView2 based on various OS conditions.
231+
232+
- For more information on when Trident+ or Webview2 is used, see [Browsers and webview controls used by Office Add-ins](../concepts/browsers-used-by-office-web-add-ins.md).
233+
- For more information on how to determine which webview is running, see [Support older Microsoft webviews and Office versions](../develop/support-ie-11.md#determine-the-webview-the-add-in-is-running-in-at-runtime)
234+
211235
### How do I validate the ID token or authenticate the user?
212236

213237
Using Exchange tokens, you can validate the ID token and use it to authorize the user to access your own resources. For more information, see [Authenticate a user with an identity token for Exchange](authenticate-a-user-with-an-identity-token.md). However, MSAL with Entra ID tokens does not use this approach.
@@ -226,7 +250,7 @@ Passing the ID token over a network call to enable or authorize access to a serv
226250

227251
It's very important that you always request an access token to your own services. The access token also includes the same ID claims, so you don't need to pass the ID token. Instead create a custom scope for your service. For more information about app registration settings for your own services, see [Protected web API: App registration](/entra/identity-platform/scenario-protected-web-api-app-registration). When your service receives the access token, it can validate it, and use ID claims from inside the access token.
228252

229-
## How do I determine if the user is an online or on-premise account?
253+
### How do I determine if the user is an online or on-premise account?
230254

231255
You can determine if the signed-in user has an Exchange Online account or on-premise Exchange account by using the [Office.UserProfile.accountType](/javascript/api/outlook/office.userprofile) property. If the account type property value is **enterprise**, then the mailbox is on an on-premises Exchange server. Note that volume-licensed perpetual Outlook 2016 doesn’t support the **accountType** property. To work around this, call the [ResolveNames](/exchange/client-developer/web-service-reference/resolvenames-operation) operation in Exchange Web Service (EWS) in the Exchange on-premise server to get the recipient types.
232256

0 commit comments

Comments
 (0)