3

I am trying to retrieve custom property value for an event using Outlook REST API (version 2.0). The custom property was created by an Outlook Office.js Add-ins.

Here is request:

/v2.0/me/calendar/?$expand=singleValueExtendedProperties($filter=PropertyId eq 'Binary 0x0FFF')

This returns a successful response from API but it does not return the singleValueExtendedProperty.

  • Can you please confirm which platform you are using for add-ins? – Outlook Add-ins Team - MSFT Aug 20 '20 at 05:14
  • I'm sorry, I corrected the question. I used the Outlook REST API (version 2.0). Full request: `https://outlook.office365.com/api/v2.0/me/calendar/?$expand=singleValueExtendedProperties($filter=PropertyId eq 'Binary 0x0FFF')` – hoangpham2210 Aug 20 '20 at 10:04
  • Can you please share manifest file? Just want to confirm if it's add-in issue or REST Api issue. – Outlook Add-ins Team - MSFT Aug 21 '20 at 07:05
  • I checked via REST API and the response returned OK but missed the parameter as : `"SingleValueExtendedProperties": [ { "PropertyId": "Binary 0xfff", "Value": "AAAAAM46oHuqO+tNidgTYJ1lNacHAFsxcA7KMjFFuCxqe7vcq0MAAAAAAQ0AAFsxcA7KMjFFuCxqe7vcq0MAAbpcfeMAAA==" }` I want to use this value to get the Calendar ID – hoangpham2210 Aug 21 '20 at 08:54

1 Answers1

1

To get custom property, you would require an (REST) item identifier and custom properties are only applicable on messages and events.

Below are the templates for message and event respectively.

/me/messages/'<ITEM_ID>'?$expand=SingleValueExtendedProperties($filter=PropertyId eq 'String {00020329-0000-0000-c000-000000000046} Name cecp-<ADD_IN_GUID>')

/me/events/<ITEM_ID>'?$expand=SingleValueExtendedProperties($filter=PropertyId eq 'String {00020329-0000-0000-c000-000000000046} Name cecp-<ADD_IN_GUID>')

  • Thanks for your help. Currently, I want to synchonize calendar's data of Outlook in both web and application. Microsoft.Office.Interop.Outlook.MAPIFolder is used in Com-addins and Outlook REST API (version 2.0 is used in Web-addin. However, there is difference in CalendarID. Could you please provide another resolution for this case? – hoangpham2210 Aug 27 '20 at 03:32
  • @hoangpham2210 Please post this ask as a separate question with more details. – Outlook Add-ins Team - MSFT Aug 30 '20 at 16:08
  • I posted new question at: https://stackoverflow.com/questions/63669482/how-to-get-calendarid-as-mapifolder-entryid-from-rest-api – hoangpham2210 Aug 31 '20 at 10:58