Alexey
Alexey

Reputation: 626

Outlook (desktop) addin: Reasons for null Office.context.mailbox.userProfile.emailAddress?

We have run into a few situations where the Office.js API (the Outlook addin API) is returning null values for Office.context.mailbox.userProfile.emailAddress and Office.context.mailbox.userProfile.displayName. In these situations our addin can't continue its initialization. What could cause the Office.js API to return those null values?

This happens for Exchange Online users/mailboxes provided by Microsoft through AppRiver and only in Outlook (desktop). Correct values are returned when our addin runs in their OWA.

Office.initialize = function (reason) {
    var userProfile = Office.context.mailbox.userProfile;
   }
};

Thank you.

Upvotes: 2

Views: 898

Answers (2)

Dev
Dev

Reputation: 2464

@Alexey - Have you tested the same with latest Office insider build? I don't have Exchange on-premise server or hosted; rather i tested with Office 365, it works for me. Alternately you can check Outlook diagnostics or charles Web Proxy logs and see what you notice for the affected users in it...

Upvotes: 0

christobits
christobits

Reputation: 53

I've noticed this happen in Outlook for Mac clients where there is a mailbox loaded that has an Exchange 2016 back-end. Could it be that the client-specific js file is not returning the property as expected?

In my case, I see that outlook-mac-16.00.js is returning the email address and display name as expected with Office 365 as a backend, but not with Exchange 2016.

Upvotes: 2

Related Questions