Dheer Jain
Dheer Jain

Reputation: 11

Getting Permission Denied console message while executing OfficeItem.organizer.getAsync in Office365

In office 365 (version 1803) locally installed outlook(desktop client). We have added our plugin which appears in the side panel. It fetches some field information from desktop outlook using outlook API's. It requires information about these 5 field properties from desktop outlook: "subject", "itemId", "organizer", "requiredAttendees", "optionalAttendees"

We use the getAsync API for this in compose mode of Appointment to fetch these values.

Example:

  1. In case of subject we get correct response in console.

    window.Office.context.mailbox.item.subject.getAsync(function(res){console.log(res)});
    

output: {status:"succeeded", value: "appointment1"}

  1. In case of organizer

    window.Office.context.mailbox.item.organizer.getAsync(function(res){console.log(res)});
    

output : Permission Denied

Please see the attached image for the console error message.

Notes: The same flow works fine in Outlook Web APP (OWA) in Internet Explorer browser.

We tried the above scenario in create and update flows from native outlook.

Does anyone knows the reason of this issue? What can I do to resolve this issue in my locally installed outlook client?

console screenshot

<?xml version="1.0" encoding="UTF-8"?>
<!--Created:cb85b80c-f585-40ff-8bfc-12ff4d0e34a9-->
<OfficeApp xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
           xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides"
           xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xsi:type="MailApp">
    <Id>69833250-ebab-4f58-8606-59df2b358121</Id>
    <Version>1.0.0.0</Version>
    <ProviderName>Oracle</ProviderName>
    <DefaultLocale>en-US</DefaultLocale>
    <DisplayName DefaultValue="Engagement Cloud"/>
    <Description DefaultValue="fuscdrmsmc151-fa-ext.us.oracle.com"/>
    <IconUrl DefaultValue="https://fuscdrmsmc151-fa-ext.us.oracle.com/crmUI/osc365/web/css/images/osc_icon_80.png"/>
    <HighResolutionIconUrl DefaultValue="https://fuscdrmsmc151-fa-ext.us.oracle.com/crmUI/osc365/web/css/images/osc_icon_80.png"/>
    <AppDomains>
        <AppDomain>https://login.microsoftonline.com/</AppDomain>
    </AppDomains>
    <Hosts>
        <Host Name="Mailbox"/>
    </Hosts>
    <Requirements>
        <Sets>
            <Set Name="MailBox" MinVersion="1.1"/>
        </Sets>
    </Requirements>
    <FormSettings>
        <Form xsi:type="ItemRead">
            <DesktopSettings>
                <SourceLocation DefaultValue="https://fuscdrmsmc151-fa-ext.us.oracle.com/crmUI/osc365/web/index.html"/>
                <RequestedHeight>250</RequestedHeight>
            </DesktopSettings>
        </Form>
        <Form xsi:type="ItemEdit">
            <DesktopSettings>
                <SourceLocation DefaultValue="https://fuscdrmsmc151-fa-ext.us.oracle.com/crmUI/osc365/web/index.html?rc_channel=COMPOSE"/>
            </DesktopSettings>
        </Form>
    </FormSettings>
    <Permissions>ReadWriteItem</Permissions>
    <Rule xsi:type="RuleCollection" Mode="Or">
        <Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit"/>
        <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
        <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Edit"/>
        <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read"/>
    </Rule>
    <DisableEntityHighlighting>false</DisableEntityHighlighting>
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides"
                      xsi:type="VersionOverridesV1_0">
        <Hosts>
            <Host xsi:type="MailHost">
                <DesktopFormFactor>
                    <FunctionFile resid="functionFile"/>
                    <ExtensionPoint xsi:type="MessageReadCommandSurface">
                        <OfficeTab id="TabDefaultRead">
                            <Group id="oscReadGroup">
                                <Label resid="groupLabel"/>
                                <Tooltip resid="groupTooltip"/>

                                <Control xsi:type="Button" id="oscReadButton">
                                    <Label resid="buttonLabel"/>
                                    <Tooltip resid="buttonTooltip"/>
                                    <Supertip>
                                        <Title resid="superTipTitle"/>
                                        <Description resid="superTipDescription"/>
                                    </Supertip>
                                    <Icon>
                                        <bt:Image size="16" resid="osc_icon_16x16"/>
                                        <bt:Image size="32" resid="osc_icon_32x32"/>
                                        <bt:Image size="80" resid="osc_icon_80x80"/>
                                    </Icon>
                                    <Action xsi:type="ShowTaskpane">
                                        <SourceLocation resid="residOscHomeUrl"/>
                                    </Action>
                                </Control>
                            </Group>
                        </OfficeTab>
                    </ExtensionPoint>
                    <ExtensionPoint xsi:type="MessageComposeCommandSurface">
                        <OfficeTab id="TabDefaultCompose">
                            <Group id="oscComposeGroup">
                                <Label resid="groupLabel"/>
                                <Tooltip resid="groupTooltip"/>

                                <Control xsi:type="Button" id="oscComposeButton">
                                    <Label resid="buttonLabel"/>
                                    <Tooltip resid="buttonTooltip"/>
                                    <Supertip>
                                        <Title resid="superTipTitle"/>
                                        <Description resid="superTipDescription"/>
                                    </Supertip>
                                    <Icon>
                                        <bt:Image size="16" resid="osc_icon_16x16"/>
                                        <bt:Image size="32" resid="osc_icon_32x32"/>
                                        <bt:Image size="80" resid="osc_icon_80x80"/>
                                    </Icon>
                                    <Action xsi:type="ShowTaskpane">
                                        <SourceLocation resid="residOscHomeEditUrl"/>
                                    </Action>
                                </Control>
                            </Group>
                        </OfficeTab>
                    </ExtensionPoint>
                    <ExtensionPoint xsi:type="AppointmentAttendeeCommandSurface">
                        <OfficeTab id="TabDefaultApptRead">
                            <Group id="oscApptReadGroup">
                                <Label resid="groupLabel"/>
                                <Tooltip resid="groupTooltip"/>

                                <Control xsi:type="Button" id="oscApptReadButton">
                                    <Label resid="buttonLabel"/>
                                    <Tooltip resid="buttonTooltip"/>
                                    <Supertip>
                                        <Title resid="superTipTitle"/>
                                        <Description resid="superTipDescription"/>
                                    </Supertip>
                                    <Icon>
                                        <bt:Image size="16" resid="osc_icon_16x16"/>
                                        <bt:Image size="32" resid="osc_icon_32x32"/>
                                        <bt:Image size="80" resid="osc_icon_80x80"/>
                                    </Icon>
                                    <Action xsi:type="ShowTaskpane">
                                        <SourceLocation resid="residOscHomeUrl"/>
                                    </Action>
                                </Control>
                            </Group>
                        </OfficeTab>
                    </ExtensionPoint>
                    <ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
                        <OfficeTab id="TabDefaultApptCompose">
                            <Group id="oscApptComposeGroup">
                                <Label resid="groupLabel"/>
                                <Tooltip resid="groupTooltip"/>
                                <Control xsi:type="Button" id="oscApptComposeButton">
                                    <Label resid="buttonLabel"/>
                                    <Tooltip resid="buttonTooltip"/>
                                    <Supertip>
                                        <Title resid="superTipTitle"/>
                                        <Description resid="superTipDescription"/>
                                    </Supertip>
                                    <Icon>
                                        <bt:Image size="16" resid="osc_icon_16x16"/>
                                        <bt:Image size="32" resid="osc_icon_32x32"/>
                                        <bt:Image size="80" resid="osc_icon_80x80"/>
                                    </Icon>
                                    <Action xsi:type="ShowTaskpane">
                                        <SourceLocation resid="residOscHomeEditUrl"/>
                                    </Action>
                                </Control>
                            </Group>
                        </OfficeTab>
                    </ExtensionPoint>
                </DesktopFormFactor>
            </Host>
        </Hosts>
        <Resources>
            <bt:Images>
                <bt:Image id="osc_icon_16x16" DefaultValue="https://fuscdrmsmc151-fa-ext.us.oracle.com/crmUI/osc365/web/css/images/osc_icon_16.png"/>
                <bt:Image id="osc_icon_32x32" DefaultValue="https://fuscdrmsmc151-fa-ext.us.oracle.com/crmUI/osc365/web/css/images/osc_icon_32.png"/>
                <bt:Image id="osc_icon_80x80" DefaultValue="https://fuscdrmsmc151-fa-ext.us.oracle.com/crmUI/osc365/web/css/images/osc_icon_80.png"/>
            </bt:Images>
            <bt:Urls>
                <bt:Url id="residOscHomeUrl" DefaultValue="https://fuscdrmsmc151-fa-ext.us.oracle.com/crmUI/osc365/web/index.html"/>
                <bt:Url id="residOscHomeEditUrl" DefaultValue="https://fuscdrmsmc151-fa-ext.us.oracle.com/crmUI/osc365/web/index.html?rc_channel=COMPOSE"/>
            </bt:Urls>
            <bt:ShortStrings>
                <bt:String id="groupLabel" DefaultValue="Engagement Cloud"/>
                <bt:String id="buttonLabel" DefaultValue="Engagement Cloud"/>
                <bt:String id="superTipTitle" DefaultValue="fuscdrmsmc151-fa-ext.us.oracle.com"/>
            </bt:ShortStrings>
            <bt:LongStrings>
                <bt:String id="groupTooltip" DefaultValue="Oracle Engagement Cloud actions"/>
                <bt:String id="buttonTooltip" DefaultValue="Launches Oracle Engagement Cloud Application"/>
                <bt:String id="superTipDescription" DefaultValue="Launches Oracle Engagement Cloud Application"/>
            </bt:LongStrings>
        </Resources>
        <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1"
                          xsi:type="VersionOverridesV1_1">
            <Hosts>
                <Host xsi:type="MailHost">
                    <DesktopFormFactor>
                        <FunctionFile resid="functionFile"/>
                        <ExtensionPoint xsi:type="MessageReadCommandSurface">
                            <OfficeTab id="TabDefaultRead">
                                <Group id="oscReadGroup">
                                    <Label resid="groupLabel"/>
                                    <Tooltip resid="groupTooltip"/>

                                    <Control xsi:type="Button" id="oscReadButton">
                                        <Label resid="buttonLabel"/>
                                        <Tooltip resid="buttonTooltip"/>
                                        <Supertip>
                                            <Title resid="superTipTitle"/>
                                            <Description resid="superTipDescription"/>
                                        </Supertip>
                                        <Icon>
                                            <bt:Image size="16" resid="osc_icon_16x16"/>
                                            <bt:Image size="32" resid="osc_icon_32x32"/>
                                            <bt:Image size="80" resid="osc_icon_80x80"/>
                                        </Icon>
                                        <Action xsi:type="ShowTaskpane">
                                            <SourceLocation resid="residOscHomeUrl"/>
                                            <SupportsPinning>true</SupportsPinning>
                                        </Action>
                                    </Control>
                                </Group>
                            </OfficeTab>
                        </ExtensionPoint>
                        <ExtensionPoint xsi:type="MessageComposeCommandSurface">
                            <OfficeTab id="TabDefaultCompose">
                                <Group id="oscComposeGroup">
                                    <Label resid="groupLabel"/>
                                    <Tooltip resid="groupTooltip"/>

                                    <Control xsi:type="Button" id="oscComposeButton">
                                        <Label resid="buttonLabel"/>
                                        <Tooltip resid="buttonTooltip"/>
                                        <Supertip>
                                            <Title resid="superTipTitle"/>
                                            <Description resid="superTipDescription"/>
                                        </Supertip>
                                        <Icon>
                                            <bt:Image size="16" resid="osc_icon_16x16"/>
                                            <bt:Image size="32" resid="osc_icon_32x32"/>
                                            <bt:Image size="80" resid="osc_icon_80x80"/>
                                        </Icon>
                                        <Action xsi:type="ShowTaskpane">
                                            <SourceLocation resid="residOscHomeEditUrl"/>
                                            <SupportsPinning>true</SupportsPinning>
                                        </Action>
                                    </Control>
                                </Group>
                            </OfficeTab>
                        </ExtensionPoint>
                        <ExtensionPoint xsi:type="AppointmentAttendeeCommandSurface">
                            <OfficeTab id="TabDefaultApptRead">
                                <Group id="oscApptReadGroup">
                                    <Label resid="groupLabel"/>
                                    <Tooltip resid="groupTooltip"/>

                                    <Control xsi:type="Button" id="oscApptReadButton">
                                        <Label resid="buttonLabel"/>
                                        <Tooltip resid="buttonTooltip"/>
                                        <Supertip>
                                            <Title resid="superTipTitle"/>
                                            <Description resid="superTipDescription"/>
                                        </Supertip>
                                        <Icon>
                                            <bt:Image size="16" resid="osc_icon_16x16"/>
                                            <bt:Image size="32" resid="osc_icon_32x32"/>
                                            <bt:Image size="80" resid="osc_icon_80x80"/>
                                        </Icon>
                                        <Action xsi:type="ShowTaskpane">
                                            <SourceLocation resid="residOscHomeUrl"/>
                                            <SupportsPinning>true</SupportsPinning>
                                        </Action>
                                    </Control>
                                </Group>
                            </OfficeTab>
                        </ExtensionPoint>
                        <ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
                            <OfficeTab id="TabDefaultApptCompose">
                                <Group id="oscApptComposeGroup">
                                    <Label resid="groupLabel"/>
                                    <Tooltip resid="groupTooltip"/>

                                    <Control xsi:type="Button" id="oscApptComposeButton">
                                        <Label resid="buttonLabel"/>
                                        <Tooltip resid="buttonTooltip"/>
                                        <Supertip>
                                            <Title resid="superTipTitle"/>
                                            <Description resid="superTipDescription"/>
                                        </Supertip>
                                        <Icon>
                                            <bt:Image size="16" resid="osc_icon_16x16"/>
                                            <bt:Image size="32" resid="osc_icon_32x32"/>
                                            <bt:Image size="80" resid="osc_icon_80x80"/>
                                        </Icon>
                                        <Action xsi:type="ShowTaskpane">
                                            <SourceLocation resid="residOscHomeEditUrl"/>
                                            <SupportsPinning>true</SupportsPinning>
                                        </Action>
                                    </Control>
                                </Group>
                            </OfficeTab>
                        </ExtensionPoint>
                    </DesktopFormFactor>
                </Host>
            </Hosts>
            <Resources>
                <bt:Images>
                    <bt:Image id="osc_icon_16x16"
                              DefaultValue="https://fuscdrmsmc151-fa-ext.us.oracle.com/crmUI/osc365/web/css/images/osc_icon_16.png"/>
                    <bt:Image id="osc_icon_32x32"
                              DefaultValue="https://fuscdrmsmc151-fa-ext.us.oracle.com/crmUI/osc365/web/css/images/osc_icon_32.png"/>
                    <bt:Image id="osc_icon_80x80"
                              DefaultValue="https://fuscdrmsmc151-fa-ext.us.oracle.com/crmUI/osc365/web/css/images/osc_icon_80.png"/>
                </bt:Images>
                <bt:Urls>
                    <bt:Url id="residOscHomeUrl"
                            DefaultValue="https://fuscdrmsmc151-fa-ext.us.oracle.com/crmUI/osc365/web/index.html"/>
                    <bt:Url id="residOscHomeEditUrl"
                            DefaultValue="https://fuscdrmsmc151-fa-ext.us.oracle.com/crmUI/osc365/web/index.html?rc_channel=COMPOSE"/>
                </bt:Urls>
                <bt:ShortStrings>
                    <bt:String id="groupLabel" DefaultValue="Engagement Cloud"/>
                    <bt:String id="buttonLabel" DefaultValue="Engagement Cloud"/>
                    <bt:String id="superTipTitle" DefaultValue="fuscdrmsmc151-fa-ext.us.oracle.com"/>
                </bt:ShortStrings>
                <bt:LongStrings>
                    <bt:String id="groupTooltip" DefaultValue="Oracle Engagement Cloud actions"/>
                    <bt:String id="buttonTooltip" DefaultValue="Launches Oracle Engagement Cloud Application"/>
                    <bt:String id="superTipDescription" DefaultValue="Launches Oracle Engagement Cloud Application"/>
                </bt:LongStrings>
            </Resources>
        </VersionOverrides>
    </VersionOverrides>
</OfficeApp>

Upvotes: 1

Views: 682

Answers (2)

user7823505
user7823505

Reputation:

The organizer.getAsync API is not implemented in version 1803. I recommend checking the requirement set via Office.context.requirements.isSetSupported("Mailbox", 1.7) before calling the API. This will allow you to know if the requirement set is supported by your client version before using the API.

Upvotes: 0

Eugene Astafiev
Eugene Astafiev

Reputation: 49395

Which permissions did you specify in the manifest?

Outlook add-ins specify the required permission level in their manifest. The available levels are Restricted, ReadItem, ReadWriteItem, or ReadWriteMailbox. These levels of permissions are cumulative: Restricted is the lowest level, and each higher level includes the permissions of all the lower levels. ReadWriteMailbox includes all the supported permissions.

The Restricted permission is the most basic level of permission. Specify Restricted in the Permissions element in the manifest to request this permission. Outlook assigns this permission to a mail add-in by default if the add-in does not request a specific permission in its manifest.

Attempting to access members such as subject or organizer will return null and result in an error message which states that Outlook requires the mail add-in to have elevated permission. You must request at least the ReadItem permission.

Upvotes: 1

Related Questions