question

VineetKumar-1576 avatar image
0 Votes"
VineetKumar-1576 asked ChristyZhang-MSFT edited

User with apostrophe in email address is not added in required Attendee using Office API.

We have email/room containing apostrophe (first'lastName@mail.com).

Current behavior: Using office API (Office.context.mailbox.item.requiredAttendees.addAsync) : "emailAddress": "first'lastName@mail.com" is not added in requiredAttendees as this have aporstrophe.
Expected Behaviour : "emailAddress": "first'lastName@mail.com" must be added in requiredAttendees.

Environment

Platform [PC desktop, Mac, Office on the web]
Host [Excel, Word, PowerPoint, etc.]: OWA + Native Outlook
Operating System:Window 10
Browser : Chrome (We support all browsers ie Microsoft Edge| Mozilla | Safari)

Steps:
Passed Scenario:
1. Open calendar --> click on any time slot to book a meeting, paste email address (first'lastName@mail.com) to invitee attendee, its work.

Failed Scenario:
2. Now add attendee using office api ie
Code Snippet
var emailArray = [ { "displayName": "Allie Bellew", "emailAddress": "first'lastName@mail.com" }, { "displayName": "Alex Darrow", "emailAddress": "firstNamelastName@mail.com" } ];
function setRequiredAttendees() {
Office.context.mailbox.item.requiredAttendees.addAsync(emailArray, function(asyncResult) {
if (asyncResult.error){
}
if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
} else {
console.error(asyncResult.error);
}
});
}
3. In above case "emailAddress": "first'lastName@mail.com" is not added in requiredAttendees as this have aporstrophe.
4. In above case only "emailAddress": "firstNamelastName@mail.com" is added in requiredAttendees.

Please suggest how email address ("emailAddress": "first'lastName@mail.com") with apostrophe will be added in requiredAttendees as we mentioned in point #3.

Context

We have outlook addin which fetch data from api and add emailAddress using office api (Office.context.mailbox.item.requiredAttendees.addAsync.

Userful logs:
134807-image.png


office-js-dev
image.png (79.0 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @VineetKumar-1576 ,

Welcome to our forum!

According to your description, I noticed that you tried to create a meeting in outlook (desktop client & web mail) and add "test'name@mail.com” as a meeting attendee, but the address of the meeting attendee can only be displayed as“ testname@mail.com ”, right?

If so, based on my test on my Outlook 365(version 2108(Build 14326.20404 Click-to-Run)), the address with apostrophe can be displayed successfully in required Attendees. Please make sure you have upgraded your Outlook to the latest version.
134847-2.png

If this issue occurs on outlook for web, please kindly understand that the Outlook tag here we mainly focus on general issues about Outlook desktop client, In order to better solve your problem, it's suggested that you could post your case in dedicated forum for Outlook.com.

If the above isn't your issue, please provide more information about your case.

0 Votes 0 ·
2.png (33.4 KiB)

Hi @ChristyZhang-MSFT ,

Thanks for reply.

My concern is that
1) if we add "test'name@mail.com” as a meeting attendee then its working fine.

2) But if we add this using officejs api as mentioned in below code snippet, then its not added.

Code Snippet
var emailArray = [ { "displayName": "Test Name, "emailAddress": "test'name@mail.com" } ];
function setRequiredAttendees() {
Office.context.mailbox.item.requiredAttendees.addAsync(emailArray, function(asyncResult) {

Excpected : If we add "test'name@mail.com” using office js api, then this should be added.

0 Votes 0 ·

Hi @VineetKumar-1576 ,

Thanks for your reply!

Looks like the issue is more related to office js api. Please kindly understand that the Outlook tag here we mainly focus on general issues about Outlook desktop client and we will remove "office-outlook-itpro" tag.

Thanks for your understanding and hope your issue would be resolved soon.

1 Vote 1 ·

0 Answers