OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
687 stars 94 forks source link

Office.context.mailbox.item.(to,cc,bcc) : Alias email recipients type always is external user. #3248

Closed jasonhieu1905 closed 1 year ago

jasonhieu1905 commented 1 year ago

Your Environment

Expected behavior

should return internal

Current behavior

always return external for all platforms and browsers

Steps to reproduce

  1. open scriptlab and select sample : Get and set to (Message Compose)
  2. console.log with recipientType from user
  3. see the result always is external

Context

Useful logs

Windows: windows

Browser web

Mac:

MicrosoftTeams-image (1)
exextoc commented 1 year ago

There are several ways a user can enter the email-id in the To field like from address-book, Contacts, typed in etc. Can you please let us know how you are entering the email address .It will be more helpful if you can share a repro video

jasonhieu1905 commented 1 year ago

@exextoc : we normally copy and paste the value from here into the recipient:

image

We do not see the suggestion about Alias when click To/Cc/Bcc, hope that helps.

exextoc commented 1 year ago

We are not able to repro this issue. To investigate it further can you please share a repro video with us??

jasonhieu1905 commented 1 year ago

@exextoc : I attached the gif. In this scenario, I chose 2 users (both are same domain). The first one is email, the second I entered the alias address. You can see it returns externalUser recipientType for the Alias address.

chrome_zpiHw10lbM

Note that I could not select alias from here image

exextoc commented 1 year ago

@jasonhieu1905 Thank you for reporting this issue. However, this is an expected behavior. The recipientType value should be ExternalUser unless the value is resolved by Outlook. Please refer the following documentation: https://learn.microsoft.com/en-us/javascript/api/outlook/office.mailboxenums.recipienttype?view=outlook-js-preview

Currently, our documentation calls out this behavior only for Win32. We would be updating it to call out that the behavior is true for other platforms as well.