Skip to content

Commit aca912f

Browse files
author
github-actions
committed
Merge branch 'main' into live
2 parents 551b16a + 33e51ce commit aca912f

10 files changed

+47
-35
lines changed

docs/develop/troubleshoot-sso-in-office-add-ins.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Troubleshoot error messages for single sign-on (SSO)
33
description: Guidance about how to troubleshoot problems with single sign-on (SSO) in Office Add-ins, and handle special conditions or errors.
4-
ms.date: 10/24/2024
4+
ms.date: 02/07/2024
55
ms.localizationpriority: medium
66
---
77

@@ -77,7 +77,14 @@ Client Error. This error is only seen in **Office on the web**. Your code should
7777
The Office application was unable to get an access token to the add-in's web service.
7878

7979
- If this error occurs during development, be sure that your add-in registration and add-in manifest specify the `profile` permission (and the `openid` permission, if you are using MSAL.NET). For more information, see [Register an Office Add-in that uses single sign-on (SSO) with the Microsoft identity platform](register-sso-add-in-aad-v2.md).
80-
- In production, an account mismatch could cause this error. For example, if the user attempts to sign in with a personal Microsoft account (MSA) when a Work or school account was expected. For these cases, your code should fall back to an alternate system of user authentication. For more information on account types, see [Identity and account types for single- and multi-tenant apps](/security/zero-trust/develop/identity-supported-account-types)
80+
- In production, an account mismatch could cause this error. For example, if the user attempts to sign in with a personal Microsoft account (MSA) when a Work or school account was expected. For these cases, your code should fall back to an alternate system of user authentication. For more information on account types, see [Identity and account types for single- and multi-tenant apps](/security/zero-trust/develop/identity-supported-account-types).
81+
- Make sure your application is enabled for users to sign-in for your organization.
82+
1. Sign in to the [Microsoft Azure portal](https://portal.azure.com/).
83+
2. Go to your add-in's app registration.
84+
3. On the **Overview** page, select **Managed application in local directory**.
85+
:::image type="content" source="../images/azure-portal-managed-application.png" alt-text="The Managed application in local directory option in the App Registration Overview window.":::
86+
1. Select **Manage** > **Properties**, and ensure that the value of **Enabled for users to sign-in?** is **Yes**.
87+
:::image type="content" source="../images/azure-portal-enable-sign-in.png" alt-text="The option to allow users in the organization to sign-in to an application in the Properties window.":::
8188

8289
### 13008
8390

109 KB
Loading
74.8 KB
Loading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add-ins that interact with the user's calendar, meetings, or appointments are available only if the user opens the calendar in Outlook, not Teams.

docs/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form.md

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Add and remove attachments in an Outlook add-in
33
description: Use various attachment APIs to manage the files or Outlook items attached to the item the user is composing.
4-
ms.date: 02/13/2025
4+
ms.date: 02/18/2025
55
ms.topic: how-to
66
ms.localizationpriority: medium
77
---
@@ -76,39 +76,32 @@ Office.context.mailbox.item.addFileAttachmentAsync(
7676
);
7777
```
7878

79-
To add inline a Base64-encoded image to the body of a message or appointment being composed, you must first get the current item body using the `Office.context.mailbox.item.body.getAsync` method before inserting the image using the `addFileAttachmentFromBase64Async` method. Otherwise, the image won't render in the body once it's inserted. For guidance, see the following JavaScript example, which adds an inline Base64 image to the beginning of an item body.
79+
To add an inline Base64-encoded image to the body of a message or appointment being composed, use the [Body API](/javascript/api/outlook/office.body) methods, such as [prependAsync](/javascript/api/outlook/office.body#outlook-office-body-prependasync-member(1)), [setSignatureAsync](/javascript/api/outlook/office.body#outlook-office-body-setsignatureasync-member(1)), or [setAsync](/javascript/api/outlook/office.body#outlook-office-body-setasync-member(1)).
80+
81+
> [!TIP]
82+
> Before inserting the image inline using `Office.context.mailbox.item.body.setAsync`, you must first call `Office.context.mailbox.item.body.getAsync` to get the current body of the mail item. Otherwise, the image won't render in the body once it's inserted. For guidance, see the [Add inline Base64-encoded image to message or appointment body (Compose)](https://raw.githubusercontent.com/OfficeDev/office-js-snippets/refs/heads/main/samples/outlook/20-item-body/add-inline-base64-image.yaml) sample in [Script Lab](../overview/explore-with-script-lab.md).
83+
84+
The following is an example of a Base64-encoded image prepended to the body of a mail item.
8085

8186
```javascript
82-
const mailItem = Office.context.mailbox.item;
8387
const base64String =
8488
"iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAnUExURQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN0S+bUAAAAMdFJOUwAQIDBAUI+fr7/P7yEupu8AAAAJcEhZcwAADsMAAA7DAcdvqGQAAAF8SURBVGhD7dfLdoMwDEVR6Cspzf9/b20QYOthS5Zn0Z2kVdY6O2WULrFYLBaLxd5ur4mDZD14b8ogWS/dtxV+dmx9ysA2QUj9TQRWv5D7HyKwuIW9n0vc8tkpHP0W4BOg3wQ8wtlvA+PC1e8Ao8Ld7wFjQtHvAiNC2e8DdqHqKwCrUPc1gE1AfRVgEXBfB+gF0lcCWoH2tYBOYPpqQCNwfT3QF9i+AegJfN8CtAWhbwJagtS3AbIg9o2AJMh9M5C+SVGBvx6zAfmT0r+Bv8JMwP4kyFPir+cswF5KL3WLv14zAFBCLf56Tw9cparFX4upgaJUtPhrOS1QlY5W+vWTXrGgBFB/b72ev3/0igUdQPppP/nfowfKUUEFcP207y/yxKmgAYQ+PywoAFOfCH3A2MdCFzD3kdADBvq10AGG+pXQBgb7pdAEhvuF0AIc/VtoAK7+JciAs38KIuDugyAC/v4hiMCE/i7IwLRBsh68N2WQjMVisVgs9i5bln8LGScNcCrONQAAAABJRU5ErkJggg==";
8589

86-
// Get the current body of the message or appointment.
87-
mailItem.body.getAsync(Office.CoercionType.Html, (bodyResult) => {
88-
if (bodyResult.status === Office.AsyncResultStatus.Failed) {
89-
console.error(bodyResult.error.message);
90-
return;
90+
// Add the Base64-encoded image to the beginning of the body.
91+
Office.context.mailbox.item.addFileAttachmentFromBase64Async(base64String, "sample.png", { isInline: true }, (attachmentResult) => {
92+
if (attachmentResult.status === Office.AsyncResultStatus.Failed) {
93+
console.log(`Failed to attach file: ${attachmentResult.error.message}`);
94+
return;
9195
}
9296

93-
// Insert the Base64-encoded image at the beginning of the body.
94-
const options = { isInline: true, asyncContext: bodyResult.value };
95-
mailItem.addFileAttachmentFromBase64Async(base64String, "sample.png", options, (attachResult) => {
96-
if (attachResult.status === Office.AsyncResultStatus.Failed) {
97-
console.error(attachResult.error.message);
98-
return;
99-
}
100-
101-
let body = attachResult.asyncContext;
102-
body = body.replace("<p class=MsoNormal>", `<p class=MsoNormal><img src="cid:sample.png">`);
103-
mailItem.body.setAsync(body, { coercionType: Office.CoercionType.Html }, (setResult) => {
104-
if (setResult.status === Office.AsyncResultStatus.Failed) {
105-
console.error(setResult.error.message);
106-
return;
107-
}
97+
Office.context.mailbox.item.body.prependAsync('<img src="cid:sample.png" />', { coercionType: Office.CoercionType.Html }, (prependResult) => {
98+
if (prependResult.status === Office.AsyncResultStatus.Failed) {
99+
console.log(`Failed to prepend image to body: ${attachmentResult.error.message}`);
100+
return;
101+
}
108102

109-
console.log("Inline Base64 image added to the body.");
110-
});
111-
});
103+
console.log("Inline Base64-encoded image added to the beginning of the body.");
104+
})
112105
});
113106
```
114107

docs/outlook/outlook-add-ins-overview.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Outlook add-ins overview
33
description: Outlook add-ins extend or customize the Outlook UI and are developed by Microsoft and partners using our web-based platform.
4-
ms.date: 07/18/2024
4+
ms.date: 02/19/2025
55
ms.topic: overview
66
ms.custom: scenarios:getting-started
77
ms.localizationpriority: high
@@ -25,6 +25,9 @@ Outlook add-ins are different from COM or VSTO add-ins, which are older integrat
2525
2626
The Outlook items that support add-ins include email messages, meeting requests, responses and cancellations, and appointments. Each Outlook add-in defines the context in which it is available, including the types of items and if the user is reading or composing an item.
2727

28+
> [!NOTE]
29+
> [!INCLUDE [Calendar add-ins not available in Teams](../includes/calendar-availability.md)]
30+
2831
[!INCLUDE [publish policies note](../includes/note-publish-policies.md)]
2932

3033
## Extension points
@@ -55,7 +58,7 @@ Outlook add-ins activate when the user is composing or reading a message or appo
5558

5659
- A .msg or .eml file opened from the file system.
5760

58-
- In a [group mailbox](/microsoft-365/admin/create-groups/compare-groups?view=o365-worldwide&preserve-view=true#shared-mailboxes), in a shared mailbox\*, in another user's mailbox\*, in an [archive mailbox](/office365/servicedescriptions/exchange-online-archiving-service-description/archive-client-and-compliance-&-security-feature-details?tabs=Archive-features#archive-mailbox), or in a public folder.
61+
- In a [group mailbox](/microsoft-365/admin/create-groups/compare-groups?view=o365-worldwide&preserve-view=true#shared-mailboxes), in a shared mailbox\*, in another user's mailbox\*, in an [archive mailbox](/purview/archive-mailboxes), or in a public folder.
5962

6063
> [!IMPORTANT]
6164
> \* Support for delegate access scenarios (for example, folders shared from another user's mailbox) was introduced in [requirement set 1.8](/javascript/api/requirement-sets/outlook/requirement-set-1.8/outlook-requirement-set-1.8), while shared mailbox support was introduced in [requirement set 1.13](/javascript/api/requirement-sets/outlook/requirement-set-1.13/outlook-requirement-set-1.13). To learn more, see [Implement shared folders and shared mailbox scenarios](delegate-access.md).

docs/outlook/outlook-addin-design.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Outlook add-in design
33
description: Guidelines to help you design and build a compelling add-in, which brings the best of your app right into Outlook on the web, on Windows, on Mac, on Android, and on iOS.
4-
ms.date: 08/12/2021
4+
ms.date: 02/19/2025
55
ms.topic: best-practice
66
ms.localizationpriority: high
77
---
@@ -20,6 +20,9 @@ The best designed add-ins are simple to use, focused, and provide real value to
2020

2121
Your add-in will be an extension of our experience and it's important to make sure the scenarios you enable feel like a natural fit inside Outlook. Think carefully about which of your common use cases will benefit the most from having hooks to them from within our email and calendaring experiences.
2222

23+
> [!NOTE]
24+
> [!INCLUDE [Calendar add-ins not available in Teams](../includes/calendar-availability.md)]
25+
2326
An add-in shouldn't attempt to do everything your app does. The focus should be on the most frequently used, and appropriate, actions in the context of Outlook content. Think about your call to action and make it clear what the user should do when your task pane opens.
2427

2528
### Make it feel as native as possible

docs/outlook/smart-alerts-onmessagesend-walkthrough.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Automatically check for an attachment before a message is sent
33
description: Learn how to implement an event-based add-in that implements Smart Alerts to automatically check a message for an attachment before it's sent.
4-
ms.date: 10/08/2024
4+
ms.date: 02/18/2025
55
ms.topic: how-to
66
ms.localizationpriority: medium
77
---
@@ -544,7 +544,7 @@ If you implemented the optional steps to customize the **Don't Send** button or
544544
}
545545

546546
let body = attachResult.asyncContext;
547-
body = body.replace("<p class=MsoNormal>", `<p class=MsoNormal><img src="cid:sample.png">`);
547+
body += '<img src="cid:sample.png" />';
548548
mailItem.body.setAsync(body, { coercionType: Office.CoercionType.Html }, (setResult) => {
549549
if (setResult.status === Office.AsyncResultStatus.Failed) {
550550
console.log(setResult.error.message);

docs/outlook/spam-reporting.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Implement an integrated spam-reporting add-in
33
description: Learn how to implement an integrated spam-reporting add-in in Outlook.
4-
ms.date: 01/22/2025
4+
ms.date: 02/19/2025
55
ms.topic: how-to
66
ms.localizationpriority: medium
77
---
@@ -102,6 +102,7 @@ Select the tab for the type of manifest you're using.
102102

103103
1. Add the following object to the "extensions.ribbons" array. Note the following about this markup.
104104
- The "contexts" array contains the "spamReportingOverride" string. This prevents the add-in button from appearing at the end of the ribbon or in the overflow section.
105+
- The "tabs" array must be specified in an "extensions.ribbons" object. However, because the button of a spam-reporting add-in is displayed in a specific spot on the ribbon, only an empty array is specified.
105106
- The "fixedControls" array contains an object that configures the look and functionality of the add-in button on the ribbon. The name of the event handler specified in the "actionId" property must match the value used in the "id" property of the object in the "actions" array. While the "enabled" property must be specified in the array, its value doesn't affect the functionality of a spam-reporting add-in.
106107
- The "spamPreProcessingDialog" object specifies the information and options that are shown in the preprocessing dialog. While you must specify a "title" and "description" for the dialog, you can optionally configure the following properties.
107108
- The "spamReportingOptions" object. It provides a multiple-selection list of up to five choices. This helps a user identify the type of message they're reporting.
@@ -113,6 +114,7 @@ Select the tab for the type of manifest you're using.
113114
"contexts": [
114115
"spamReportingOverride"
115116
],
117+
"tabs": [],
116118
"fixedControls": [
117119
{
118120
"id": "spamReportingButton",

docs/overview/office-add-ins.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Office Add-ins platform overview
33
description: Use familiar web technologies such as HTML, CSS, and JavaScript to extend and interact with Word, Excel, PowerPoint, OneNote, Project, and Outlook.
4-
ms.date: 07/25/2024
4+
ms.date: 02/19/2025
55
ms.topic: overview
66
ms.custom: scenarios:getting-started
77
ms.localizationpriority: high
@@ -97,6 +97,9 @@ Users can run Outlook add-ins when they view, reply, or create emails, meeting r
9797
- Display contextually next to an Outlook item when you're viewing or composing it.
9898
- Perform a task when a specific event occurs, such as when a user creates a new message.
9999

100+
> [!NOTE]
101+
> [!INCLUDE [Calendar add-ins not available in Teams](../includes/calendar-availability.md)]
102+
100103
For an overview of Outlook add-ins, see [Outlook add-ins overview](../outlook/outlook-add-ins-overview.md).
101104

102105
### Create new objects in Office documents

0 commit comments

Comments
 (0)