@@ -11481,6 +11481,33 @@ Office.Diagnostics:interface:
1148111481 console.log("Current view (Outlook on the web only): Viewed from a desktop computer");
1148211482 break;
1148311483 }
11484+ Office.Diagnostics#ews:member:
11485+ - >-
11486+ // Link to full sample:
11487+ https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/99-preview-apis/get-token-status.yaml
11488+
11489+
11490+ Office.context.mailbox.diagnostics.ews.getTokenStatusAsync({ isRest: false
11491+ }, (result) => {
11492+ if (result.status === Office.AsyncResultStatus.Failed) {
11493+ console.log(result.error.message);
11494+ return;
11495+ }
11496+ const status = result.value;
11497+ switch (status) {
11498+ case Office.MailboxEnums.TokenStatus.Enabled:
11499+ console.log("EWS callback tokens are enabled.");
11500+ break;
11501+ case Office.MailboxEnums.TokenStatus.Disabled:
11502+ console.log("EWS callback tokens are disabled.");
11503+ break;
11504+ case Office.MailboxEnums.TokenStatus.Removed:
11505+ console.log(
11506+ "The organization has an Exchange Online environment. Legacy Exchange tokens are no longer supported.",
11507+ );
11508+ break;
11509+ }
11510+ });
1148411511Office.Display#body:member:
1148511512 - >-
1148611513 // Link to full sample:
@@ -11789,6 +11816,33 @@ Office.EnhancedLocation#removeAsync:member(1):
1178911816 console.error(`Failed to remove locations. Error message: ${result.error.message}`);
1179011817 }
1179111818 });
11819+ Office.Ews:interface:
11820+ - >-
11821+ // Link to full sample:
11822+ https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/99-preview-apis/get-token-status.yaml
11823+
11824+
11825+ Office.context.mailbox.diagnostics.ews.getTokenStatusAsync({ isRest: false
11826+ }, (result) => {
11827+ if (result.status === Office.AsyncResultStatus.Failed) {
11828+ console.log(result.error.message);
11829+ return;
11830+ }
11831+ const status = result.value;
11832+ switch (status) {
11833+ case Office.MailboxEnums.TokenStatus.Enabled:
11834+ console.log("EWS callback tokens are enabled.");
11835+ break;
11836+ case Office.MailboxEnums.TokenStatus.Disabled:
11837+ console.log("EWS callback tokens are disabled.");
11838+ break;
11839+ case Office.MailboxEnums.TokenStatus.Removed:
11840+ console.log(
11841+ "The organization has an Exchange Online environment. Legacy Exchange tokens are no longer supported.",
11842+ );
11843+ break;
11844+ }
11845+ });
1179211846Office.From#getAsync:member(1):
1179311847 - >-
1179411848 // Link to full sample:
@@ -13042,6 +13096,33 @@ Office.MailboxEnums.SourceProperty:enum:
1304213096 console.error(asyncResult.error);
1304313097 }
1304413098 });
13099+ Office.MailboxEnums.TokenStatus:enum:
13100+ - >-
13101+ // Link to full sample:
13102+ https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/99-preview-apis/get-token-status.yaml
13103+
13104+
13105+ Office.context.mailbox.diagnostics.ews.getTokenStatusAsync({ isRest: false
13106+ }, (result) => {
13107+ if (result.status === Office.AsyncResultStatus.Failed) {
13108+ console.log(result.error.message);
13109+ return;
13110+ }
13111+ const status = result.value;
13112+ switch (status) {
13113+ case Office.MailboxEnums.TokenStatus.Enabled:
13114+ console.log("EWS callback tokens are enabled.");
13115+ break;
13116+ case Office.MailboxEnums.TokenStatus.Disabled:
13117+ console.log("EWS callback tokens are disabled.");
13118+ break;
13119+ case Office.MailboxEnums.TokenStatus.Removed:
13120+ console.log(
13121+ "The organization has an Exchange Online environment. Legacy Exchange tokens are no longer supported.",
13122+ );
13123+ break;
13124+ }
13125+ });
1304513126Office.MailboxEnums.WeekNumber:enum:
1304613127 - >-
1304713128 // Link to full sample:
0 commit comments