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

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.

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.

#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...

Related

Start sharepoint list workflow 2010 platform from sharepoint 2013 workflow platform

I have two workflows, one of them with SharePoint Workflow 2010 platform to send email to external users, and the other is an SharePoint Workflow 2013 platform.
So, I need to start 2010 Workflow from 2013 Workflow bit i get the following error:
Retrying last request. Next attempt scheduled in less than one minute. Details of last request: HTTP BadRequest to http://win-r9ic5tcuftv:46963/Consejo/_vti_bin/client.svc/SP.WorkflowServices.InteropService.Current/StartWorkflow Correlation Id: f9b6c585-4ea5-6ec6-bf8e-127b6162b46c Instance Id: f66f7278-2519-4a01-852e-c6f1ad88d274
And this:
The HTTP method 'GET' cannot be used to access the resource 'StartWorkflow'. The operation type of the resource is specified as 'Default'. Please use correct HTTP method to invoke the resource
I tried using System Account and other users with priviledges to colaborate into the list, and it doesn't work.
Does anyone have a way to solve that?
This post on MSDN has some related information.
The issue may be related to starting a 2010 workflow from a 2013 workflow in a list or library that contains many thousands of items- specifically, the Interop service seems to have a hard time with more-than-triple-digit ID numbers.

custom buttons are not displaying in Microsoft Office Outlook Client 2010

I have added two custom button in my order entity.
Both are displaying in Web version of CRM 2013 but not displayed CRM Outlook 2010.
I have tried using Workbench 2013.
Can anyone have idea to display those buttons using Workbench?
I have figure this out but i am not sure what is the actual fix for this.
The things i have done :
1. Apply a display rule to one the group control, which contains OrGroup as following
NOTE : for some entity i am able to display buttons in outlook without
MiscellaneousPrivilegeRule
CrmOfflineAccessStateRule
2. Another rule is Enable rule as per following
3. Delete my Internet Explorer cache (used by the CRM Outlook Client)
4. Fix javascript errors, which might cause this issue using Microsoft Dynamics CRM 2013 Custom Code Validation Tool
5. Also check for any UI errors in Outlook.
To see buttons in Outlook they must have either an enabled and display rule applied that checks for either the Web or Outlook client and returns true accordingly for each. So in your case because you want the button to appear in both you must apply a rule that checks for each and returns true.
The RibbonWorkbench developer blog provides further information.
Please try:
1) Check for UI errors in Outlook: http://msdn.microsoft.com/en-us/library/bb608619.aspx
2) Make sure you have the CRM 2013 Outlook Client installed + the same/later rollup version as the CRM server.
3) Re-add the organization to the CRM Outlook Client
- Publish all customizations
- Remove the organization in Outlook
- Delete your Internet Explorer cache (used by the CRM Outlook Client).
- Re-add the organization to Outlook
4) If possible try with another computer that has a different Office version to test if the problem is related to the Outlook Client or to the ribbon customizations is CRM.

Getting messageID from email in Outlook VBA 2003

Is there a easy way to get the current shown (preferably selected) message-ID via VBA ?
without having to buy Redemption or some other package..
I need to message ID so I can make a link to a web-application that reads the mail and does some other stuff with it
Can't seem to use MAPI or PropertyAccessor in outlook 2003..
Do you mean the unique ID for the message? Try the EntryID Property:
ActiveExplorer.Selection.Item(1).EntryID
FYI PropertyAccessor was added in Outlook 2007, you wouldn't see it in 2003.

Outlook VSTO attach meta data

I am writing an Outlook addin that inserts content into an email, and I have a emailSent event that I would like send an event back to my server letting me know some content was shared.
Is there a way to attach some meta information to the email (or the word doc, which is what you are creating in outlook) so that I can grab that meta info so I can send it back to my server.
Right now, the only way I think I can do it is to search through the email on the send event looking for my content with regex and pull out the info i need, but that seems cumbersome, and also means I need to run the regex for every email sent, even when they haven't added my content.
There is the concept of MAPI user properties, which you can add to an Outlook item. Since Office 2007 the object model allows access to them. If your add-in must run also with older Outlook version, you should recurr to use Redemption (which I prefer also for higher office versions because it has more flexibility, albeit a greater footprint in distribution).
See UserProperties Interface on MSDN.

How to determine where a Mailitem is being opened from in Outlook 2007 using VSTO 2005 SE

I have an Outlook 2007 Add-in in VSTO 2005 SE that allows users to save e-mails into our document management system. From within our system users are able to open e-mails they have previously saved. However, when doing so I need to try and prevent them from saving them again.
I am trying to figure out how to determine if the Mailitem being opened is coming from the Outlook e-mail client or from an external source.
I know that normally the EntryId Property of the Mailitem is null or empty string when a Mailitem has not been previously saved in Outlook, however, it seems like when a Mailitem is being opened from within our system the EntryID is not null.
Adam,
Normally most DM systems set mapi properties or user properties on the mail items as they get saved ... DOCID etc. from the DM system. I would get outlook spy and hunt around on the DM emails to try and find this Property. Then you will be able to test for that in your VSTO add in. Failing that, may be you can explain how you open the email from you DM system is from inside outlook via a DM plug in ? or is it totally external app?
What DM System is it ?
Marcus