Create Outlook event and prevent forwarding

by jannikb   Last Updated September 11, 2019 19:26 PM - source

I want to create calendar (outlook) events via the microsoft graph api and set some specific response options. In the (windows) Outlook client I am able to enable/disable

  • Request Response
  • Allow new Time Proposals
  • Allow Forwarding

In the documentation I can only find properties to enable/disable "Request Response" https://docs.microsoft.com/en-us/graph/api/user-post-events? but not the later ones.

The question is how to enable/disable Time Proposals and Forwarding?

I tried setting the sensitivity to "personal", "private" and "confidential" but it didn't help.



Answers 1


You can do that through the extended property DoNotForward. This has the following property definition:

PropertySet: 00020329-0000-0000-C000-000000000046
Name: DoNotForward
Type: Boolean

Here is an example I wrote for this.

Allow time proposal is:

PropertySet:00062002-0000-0000-C000-000000000046
Name: AppointmentNotAllowPropose
Type: Boolean

Using the ms-graph-sdk for dotnet the following code works:

var e = new Event()
{
    Subject = "subject",
    Start = new DateTimeTimeZone()
    {
        DateTime = dateTimeTimestamp1,
        TimeZone = "Europe/Berlin"
    },
    End = new DateTimeTimeZone()
    {
        DateTime = dateTimeTimestamp2,
        TimeZone = "Europe/Berlin"
    },
    SingleValueExtendedProperties = new EventSingleValueExtendedPropertiesCollectionPage()
    {
            new SingleValueLegacyExtendedProperty
            {
            Id = "Boolean {00020329-0000-0000-C000-000000000046} Name DoNotForward",
            Value = "true"
            },
            new SingleValueLegacyExtendedProperty
        {
            Id = "Boolean {00062002-0000-0000-C000-000000000046} Id 0x825A",
            Value = "true"
        }
    }
};

The AppointmentNotAllowPropose is referenced here by id, as setting the value by it's name somehow does not have an effect.

Ivan Franjic
Ivan Franjic
September 04, 2019 04:53 AM

Related Questions



Office365 Graph API: Fetch Calendar Share Permissions

Updated February 21, 2019 02:26 AM