Skip to content

Commit 5a71564

Browse files
Merge pull request #2147 from OfficeDev/main
[Admin] (Publish)
2 parents bdf6d43 + 8de9e75 commit 5a71564

File tree

67 files changed

+2238
-196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2238
-196
lines changed

docs/code-snippets/outlook-snippets.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,31 @@ Office.Mailbox#convertToUtcClientTime:member(1):
769769
770770
// Output should be "2019-08-26T22:37:02.002Z".
771771
console.log(result.toISOString());
772+
Office.Mailbox#getIsIdentityManaged:member(1):
773+
- |-
774+
// Checks if the mailbox is managed by Microsoft Intune.
775+
const isIdentityManaged = Office.context.mailbox.getIsIdentityManaged();
776+
console.log(`Intune-managed mailbox: ${isIdentityManaged}`);
777+
Office.Mailbox#getIsOpenFromLocationAllowed:member(1):
778+
- |-
779+
// Checks if the add-in can access data from the device's photo library.
780+
const isOpenFromPhotoLibraryAllowed = Office.context.mailbox.getIsOpenFromLocationAllowed(Office.MailboxEnums.OpenLocation.PhotoLibrary);
781+
if (isOpenFromPhotoLibraryAllowed) {
782+
console.log("Access to the photo library is allowed.");
783+
// Do something.
784+
} else {
785+
console.log("Access to the photo library isn't allowed.");
786+
}
787+
Office.Mailbox#getIsSaveToLocationAllowed:member(1):
788+
- |-
789+
// Checks if the add-in can save data to SharePoint.
790+
const isSaveToSharePointAllowed = Office.context.mailbox.getIsSaveToLocationAllowed(Office.MailboxEnums.SaveLocation.SharePoint);
791+
if (isSaveToSharePointAllowed) {
792+
console.log("Saving to SharePoint is allowed.");
793+
// Do something.
794+
} else {
795+
console.log("Saving to SharePoint isn't allowed.");
796+
}
772797
Office.Mailbox#makeEwsRequestAsync:member(1):
773798
- |-
774799
function getSubjectRequest(id) {
@@ -975,6 +1000,26 @@ Office.MailboxEnums.MoveSpamItemTo:enum:
9751000
});
9761001
});
9771002
}
1003+
Office.MailboxEnums.OpenLocation:enum:
1004+
- |-
1005+
// Checks if the add-in can access data from the device's photo library.
1006+
const isOpenFromPhotoLibraryAllowed = Office.context.mailbox.getIsOpenFromLocationAllowed(Office.MailboxEnums.OpenLocation.PhotoLibrary);
1007+
if (isOpenFromPhotoLibraryAllowed) {
1008+
console.log("Access to the photo library is allowed.");
1009+
// Do something.
1010+
} else {
1011+
console.log("Access to the photo library isn't allowed.");
1012+
}
1013+
Office.MailboxEnums.SaveLocation:enum:
1014+
- |-
1015+
// Checks if the add-in can save data to SharePoint.
1016+
const isSaveToSharePointAllowed = Office.context.mailbox.getIsSaveToLocationAllowed(Office.MailboxEnums.SaveLocation.SharePoint);
1017+
if (isSaveToSharePointAllowed) {
1018+
console.log("Saving to SharePoint is allowed.");
1019+
// Do something.
1020+
} else {
1021+
console.log("Saving to SharePoint isn't allowed.");
1022+
}
9781023
Office.MailboxEnums.SendModeOverride:enum:
9791024
- |-
9801025
// The following example checks whether a location is specified in an appointment before it's sent.

docs/docs-ref-autogen/office/office/office.auth.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ methods:
113113
114114
**Important**: In Outlook, this API isn't supported if the add-in is loaded in an Outlook.com or Gmail
115115
mailbox.
116-
117-
118-
**Warning**: `getAccessTokenAsync` has been deprecated. Use `Office.auth.getAccessToken` instead.
119116
remarks: >-
120117
**Applications**: Excel, OneNote, Outlook, PowerPoint, Word
121118
@@ -176,9 +173,6 @@ methods:
176173
177174
**Important**: In Outlook, this API isn't supported if the add-in is loaded in an Outlook.com or Gmail
178175
mailbox.
179-
180-
181-
**Warning**: `getAccessTokenAsync` has been deprecated. Use `Office.auth.getAccessToken` instead.
182176
remarks: >-
183177
**Applications**: Excel, OneNote, Outlook, PowerPoint, Word
184178

docs/docs-ref-autogen/office/office/office.authoptions.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ properties:
8383
summary: >-
8484
Prompts the user to add their Office account (or to switch to it, if it is already added). Default value is
8585
`false`<!-- -->.
86-
87-
88-
**Warning**: `forceAddAccount` has been deprecated. Use `allowSignInPrompt` instead.
8986
remarks: ''
9087
isPreview: false
9188
isDeprecated: true
@@ -101,9 +98,6 @@ properties:
10198
summary: >-
10299
Causes Office to display the add-in consent experience. Useful if the add-in's Azure permissions have changed or
103100
if the user's consent has been revoked. Default value is `false`<!-- -->.
104-
105-
106-
**Warning**: `forceConsent` has been deprecated. Use `allowConsentPrompt` instead.
107101
remarks: ''
108102
isPreview: false
109103
isDeprecated: true

docs/docs-ref-autogen/office/office/office.requirementsetsupport.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,7 @@ methods:
3333
uid: 'office!Office.RequirementSetSupport#isSetSupported:member(2)'
3434
package: office!
3535
fullName: 'isSetSupported(name, minVersionNumber)'
36-
summary: >-
37-
Check if the specified requirement set is supported by the Office application.
38-
39-
40-
**Warning**: This overload of `isSetSupported` (where `minVersionNumber` is a number) has been deprecated. Use
41-
the string overload of `isSetSupported` instead.
36+
summary: Check if the specified requirement set is supported by the Office application.
4237
remarks: ''
4338
isPreview: false
4439
isDeprecated: true

docs/docs-ref-autogen/office_release/office/office.auth.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ methods:
113113
114114
**Important**: In Outlook, this API isn't supported if the add-in is loaded in an Outlook.com or Gmail
115115
mailbox.
116-
117-
118-
**Warning**: `getAccessTokenAsync` has been deprecated. Use `Office.auth.getAccessToken` instead.
119116
remarks: >-
120117
**Applications**: Excel, OneNote, Outlook, PowerPoint, Word
121118
@@ -176,9 +173,6 @@ methods:
176173
177174
**Important**: In Outlook, this API isn't supported if the add-in is loaded in an Outlook.com or Gmail
178175
mailbox.
179-
180-
181-
**Warning**: `getAccessTokenAsync` has been deprecated. Use `Office.auth.getAccessToken` instead.
182176
remarks: >-
183177
**Applications**: Excel, OneNote, Outlook, PowerPoint, Word
184178

docs/docs-ref-autogen/office_release/office/office.authoptions.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ properties:
8383
summary: >-
8484
Prompts the user to add their Office account (or to switch to it, if it is already added). Default value is
8585
`false`<!-- -->.
86-
87-
88-
**Warning**: `forceAddAccount` has been deprecated. Use `allowSignInPrompt` instead.
8986
remarks: ''
9087
isPreview: false
9188
isDeprecated: true
@@ -101,9 +98,6 @@ properties:
10198
summary: >-
10299
Causes Office to display the add-in consent experience. Useful if the add-in's Azure permissions have changed or
103100
if the user's consent has been revoked. Default value is `false`<!-- -->.
104-
105-
106-
**Warning**: `forceConsent` has been deprecated. Use `allowConsentPrompt` instead.
107101
remarks: ''
108102
isPreview: false
109103
isDeprecated: true

docs/docs-ref-autogen/office_release/office/office.requirementsetsupport.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,7 @@ methods:
3333
uid: 'office!Office.RequirementSetSupport#isSetSupported:member(2)'
3434
package: office!
3535
fullName: 'isSetSupported(name, minVersionNumber)'
36-
summary: >-
37-
Check if the specified requirement set is supported by the Office application.
38-
39-
40-
**Warning**: This overload of `isSetSupported` (where `minVersionNumber` is a number) has been deprecated. Use
41-
the string overload of `isSetSupported` instead.
36+
summary: Check if the specified requirement set is supported by the Office application.
4237
remarks: ''
4338
isPreview: false
4439
isDeprecated: true

docs/docs-ref-autogen/outlook/outlook/office.mailbox.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2163,6 +2163,20 @@ methods:
21632163
21642164
21652165
- `MAMServiceNotAvailable`<!-- -->: The client is unable to fetch the mobile application management (MAM) policy.
2166+
2167+
2168+
#### Examples
2169+
2170+
2171+
```TypeScript
2172+
2173+
// Checks if the mailbox is managed by Microsoft Intune.
2174+
2175+
const isIdentityManaged = Office.context.mailbox.getIsIdentityManaged();
2176+
2177+
console.log(`Intune-managed mailbox: ${isIdentityManaged}`);
2178+
2179+
```
21662180
isPreview: false
21672181
isDeprecated: false
21682182
syntax:
@@ -2201,6 +2215,26 @@ methods:
22012215
22022216
22032217
- `MAMServiceNotAvailable`<!-- -->: The client is unable to fetch the MAM policy.
2218+
2219+
2220+
#### Examples
2221+
2222+
2223+
```TypeScript
2224+
2225+
// Checks if the add-in can access data from the device's photo library.
2226+
2227+
const isOpenFromPhotoLibraryAllowed =
2228+
Office.context.mailbox.getIsOpenFromLocationAllowed(Office.MailboxEnums.OpenLocation.PhotoLibrary);
2229+
2230+
if (isOpenFromPhotoLibraryAllowed) {
2231+
console.log("Access to the photo library is allowed.");
2232+
// Do something.
2233+
} else {
2234+
console.log("Access to the photo library isn't allowed.");
2235+
}
2236+
2237+
```
22042238
isPreview: false
22052239
isDeprecated: false
22062240
syntax:
@@ -2243,6 +2277,26 @@ methods:
22432277
22442278
22452279
- `MAMServiceNotAvailable`<!-- -->: The client is unable to fetch the MAM policy.
2280+
2281+
2282+
#### Examples
2283+
2284+
2285+
```TypeScript
2286+
2287+
// Checks if the add-in can save data to SharePoint.
2288+
2289+
const isSaveToSharePointAllowed =
2290+
Office.context.mailbox.getIsSaveToLocationAllowed(Office.MailboxEnums.SaveLocation.SharePoint);
2291+
2292+
if (isSaveToSharePointAllowed) {
2293+
console.log("Saving to SharePoint is allowed.");
2294+
// Do something.
2295+
} else {
2296+
console.log("Saving to SharePoint isn't allowed.");
2297+
}
2298+
2299+
```
22462300
isPreview: false
22472301
isDeprecated: false
22482302
syntax:

docs/docs-ref-autogen/outlook/outlook/office.mailboxenums.openlocation.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,26 @@ remarks: >-
1313
**Important**: This enum is only supported in Outlook on Android and on iOS starting in Version 4.2443.0. To learn
1414
more about APIs supported in Outlook on mobile devices, see [Outlook JavaScript APIs supported in Outlook on mobile
1515
devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis)<!-- -->.
16+
17+
18+
#### Examples
19+
20+
21+
```TypeScript
22+
23+
// Checks if the add-in can access data from the device's photo library.
24+
25+
const isOpenFromPhotoLibraryAllowed =
26+
Office.context.mailbox.getIsOpenFromLocationAllowed(Office.MailboxEnums.OpenLocation.PhotoLibrary);
27+
28+
if (isOpenFromPhotoLibraryAllowed) {
29+
console.log("Access to the photo library is allowed.");
30+
// Do something.
31+
} else {
32+
console.log("Access to the photo library isn't allowed.");
33+
}
34+
35+
```
1636
isPreview: false
1737
isDeprecated: false
1838
fields:

docs/docs-ref-autogen/outlook/outlook/office.mailboxenums.savelocation.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,26 @@ remarks: >-
1313
**Important**: This enum is only supported in Outlook on Android and on iOS starting in Version 4.2443.0. To learn
1414
more about APIs supported in Outlook on mobile devices, see [Outlook JavaScript APIs supported in Outlook on mobile
1515
devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis)<!-- -->.
16+
17+
18+
#### Examples
19+
20+
21+
```TypeScript
22+
23+
// Checks if the add-in can save data to SharePoint.
24+
25+
const isSaveToSharePointAllowed =
26+
Office.context.mailbox.getIsSaveToLocationAllowed(Office.MailboxEnums.SaveLocation.SharePoint);
27+
28+
if (isSaveToSharePointAllowed) {
29+
console.log("Saving to SharePoint is allowed.");
30+
// Do something.
31+
} else {
32+
console.log("Saving to SharePoint isn't allowed.");
33+
}
34+
35+
```
1636
isPreview: false
1737
isDeprecated: false
1838
fields:

0 commit comments

Comments
 (0)