Add getAccessToken guidance for Outlook on the web (#65774)

This commit is contained in:
Sam Ramon
2023-06-13 15:33:21 -07:00
committed by GitHub
parent 65fd569224
commit 2cba0e1135
3 changed files with 32 additions and 14 deletions

View File

@@ -1550,13 +1550,19 @@ declare namespace Office {
*
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/identity-api-requirement-sets | IdentityAPI 1.3}
*
* **Important**: In Outlook, this API isn't supported in the following scenarios.
* **Important**:
*
* - If the add-in is loaded in an Outlook.com or Gmail mailbox.
* - In Outlook, this API isn't supported in the following scenarios.
*
* - If the add-in is loaded in Outlook on the web in the Safari browser. This results in error 13001 ("The user is not signed into Office").
* - If the add-in is loaded in an Outlook.com or Gmail mailbox.
*
* **Note**: In an Outlook event-based activation add-in, this API is supported in Outlook on Windows starting from Version 2111 (Build 14701.20000).
* - If the add-in is loaded in Outlook on the web in the Safari browser. This results in error 13001 ("The user is not signed into Office").
*
* - In Outlook on the web, if you use the
* {@link https://learn.microsoft.com/javascript/api/office/office.ui#office-office-ui-displaydialogasync-member(1) | displayDialogAsync}
* method to open a dialog, you must close the dialog before you can call `getAccessToken`.
*
* - In an Outlook event-based activation add-in, this API is supported in Outlook on Windows starting from Version 2111 (Build 14701.20000).
* To retrieve an access token in older builds, use
* {@link https://learn.microsoft.com/javascript/api/office-runtime/officeruntime.auth?view=common-js-preview#office-runtime-officeruntime-auth-getaccesstoken-member(1) |
* OfficeRuntime.auth.getAccessToken} instead. For more information, see

View File

@@ -1544,17 +1544,23 @@ declare namespace Office {
*
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/identity-api-requirement-sets | IdentityAPI 1.3}
*
* **Important**: In Outlook, this API isn't supported in the following scenarios.
* **Important**:
*
* - If the add-in is loaded in an Outlook.com or Gmail mailbox.
* - In Outlook, this API isn't supported in the following scenarios.
*
* - If the add-in is loaded in Outlook on the web in the Safari browser. This results in error 13001 ("The user is not signed into Office").
* - If the add-in is loaded in an Outlook.com or Gmail mailbox.
*
* **Note**: In an Outlook event-based activation add-in, this API is supported in Outlook on Windows starting from Version 2111 (Build 14701.20000).
* - If the add-in is loaded in Outlook on the web in the Safari browser. This results in error 13001 ("The user is not signed into Office").
*
* - In Outlook on the web, if you use the
* {@link https://learn.microsoft.com/javascript/api/office/office.ui#office-office-ui-displaydialogasync-member(1) | displayDialogAsync}
* method to open a dialog, you must close the dialog before you can call `getAccessToken`.
*
* - In an Outlook event-based activation add-in, this API is supported in Outlook on Windows starting from Version 2111 (Build 14701.20000).
* To retrieve an access token in older builds, use
* {@link https://learn.microsoft.com/javascript/api/office-runtime/officeruntime.auth?view=common-js#office-runtime-officeruntime-auth-getaccesstoken-member(1) |
* OfficeRuntime.auth.getAccessToken} instead. For more information, see
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-sso-in-event-based-activation | Enable single sign-on (SSO) in Outlook add-ins that use event-based activation}.
* {@link https://learn.microsoft.com/javascript/api/office-runtime/officeruntime.auth?view=common-js-preview#office-runtime-officeruntime-auth-getaccesstoken-member(1) |
* OfficeRuntime.auth.getAccessToken} instead. For more information, see
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-sso-in-event-based-activation | Enable single sign-on (SSO) in Outlook add-ins that use event-based activation}.
*
* @param options - Optional. Accepts an `AuthOptions` object to define sign-on behaviors.
* @returns Promise to the access token.

View File

@@ -353,11 +353,17 @@ declare namespace OfficeRuntime {
*
* **Applications**: Excel, Outlook, PowerPoint, Word
*
* **Important**: In Outlook, this API isn't supported in the following scenarios.
* **Important**:
*
* - If the add-in is loaded in an Outlook.com or Gmail mailbox.
* - In Outlook, this API isn't supported in the following scenarios.
*
* - If the add-in is loaded in Outlook on the web in the Safari browser. This results in error 13001 ("The user is not signed into Office").
* - If the add-in is loaded in an Outlook.com or Gmail mailbox.
*
* - If the add-in is loaded in Outlook on the web in the Safari browser. This results in error 13001 ("The user is not signed into Office").
*
* - In Outlook on the web, if you use the
* {@link https://learn.microsoft.com/javascript/api/office/office.ui#office-office-ui-displaydialogasync-member(1) | displayDialogAsync}
* method to open a dialog, you must close the dialog before you can call `getAccessToken`.
*
* @param options - Optional. Accepts an `AuthOptions` object to define sign-on behaviors.
* @returns Promise to the access token.