验证清单版本 Office365 插件

Validation of manifest versions Office365 addin

我们正在尝试向商店提交我们的第一个 outlook 办公室插件,但由于 Outlook webaccess 2013 而被拒绝。我们正在尝试使用 1.3 api,它在 2013 年不应受到支持,但验证团队仍在测试 owa 2013。

在此页面上,Microsoft 明确指出 OWA 2013 需要 1.1。 http://dev.office.com/reference/add-ins/outlook/tutorial-api-requirement-sets

验证团队的评论是: 您的加载项无法在 Windows 7 上使用 Internet Explorer 11 的 Outlook 2013 客户端中运行。用户无法向 Hogia 进行身份验证。认证到O365再认证到Hogia,认证弹窗关闭,但是用户没有登录。

Fiddler 跟踪中不再出现 404 错误,但用户未登录到任务窗格,加载项不可用。

如果您不支持 2013 SP1,因为您使用的是仅在 2016/Online 中可用的 API,则必须将这些 api 放入清单的需求标记中。如果您使用的不是仅在 2016/Online 中可用的 API,则您必须支持 2013 SP1。

下面提供的是我们的匿名清单。关于如何将插件限制为仅 1.3 的任何想法。是不是 xml-namespace 也应该是 1.3?

<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using transformations
     see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->

<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
  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/1.0"
  xsi:type="MailApp">

  <Id>0ada1ef7-1cea-4e3a-b946-a234e777d07b</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>Provider</ProviderName>
  <DefaultLocale>sv-SE</DefaultLocale>

  <DisplayName DefaultValue="Name"/>
  <Description DefaultValue="Description"/>
  <IconUrl DefaultValue="url" />
  <HighResolutionIconUrl DefaultValue="url" />
  <SupportUrl DefaultValue="url" />
  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>

  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.3" />
    </Sets>
  </Requirements>
  <!-- These elements support older clients that don't support add-in commands -->
  <FormSettings>
    <Form xsi:type="ItemEdit">
      <DesktopSettings>
        <SourceLocation DefaultValue="url"/>
      </DesktopSettings>
      <TabletSettings>
        <SourceLocation DefaultValue="url"/>
      </TabletSettings>
      <PhoneSettings>
        <SourceLocation DefaultValue="url"/>
      </PhoneSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteMailbox</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Edit" />
  </Rule>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.3">
        <bt:Set Name="Mailbox" />
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="MailHost">

        <DesktopFormFactor>
          <!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
          <FunctionFile resid="functionFile" />

          <!-- Message Read -->
          <ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
            <!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
            <OfficeTab id="TabDefault">
              <!-- Up to 6 Groups added per Tab -->
              <Group id="apptComposeDemoGroup">
                <Label resid="groupLabel" />
                <!-- Launch the add-in : task pane button -->
                <Control xsi:type="Button" id="apptComposeFunctionButton">
                  <Label resid="funcComposeButtonLabel" />
                  <Supertip>
                    <Title resid="funcComposeButtonLabel" />
                    <Description resid="funcComposeSuperTipDescription" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="icon16" />
                    <bt:Image size="32" resid="icon32" />
                    <bt:Image size="80" resid="icon80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="functionFile" />
                  </Action>
                </Control>
                <!-- Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
              </Group>
            </OfficeTab>
          </ExtensionPoint>
          <!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="icon16" DefaultValue="url"/>
        <bt:Image id="icon32" DefaultValue="url"/>
        <bt:Image id="icon80" DefaultValue="url"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="functionFile" DefaultValue="url"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="groupLabel" DefaultValue="Name"/>
        <bt:String id="funcComposeButtonLabel"  DefaultValue="Name"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="paneReadSuperTipDescription" DefaultValue="string"/>
        <bt:String id="funcComposeSuperTipTitle" DefaultValue="string"/>
        <bt:String id="funcComposeSuperTipDescription" DefaultValue="string"/>
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>

鉴于此问题与 OAUTH 相关,我建议查看 Dialog API。这个 API 的核心目的之一就是处理这样的场景。

然而,这假设您对面向 Outlook 2013 不感兴趣。对话框 API 需要 Mailbox 1.4,该版本仅在 2016 年才受支持。由于需要 1.4,加载项将不会出现在 Outlook 2013 中。