Outlook add-in Failed Sideloading
Hello,
I am attempting to build an Outlook add-in that will scan the contents of an open email and determine if any links in that email are from a trusted domain. I am not interested in a task pane add-in or really any user-facing buttons/panels. I want the add-in to automatically activate when the user opens an email.
I have been attempting to build a working manifest file that I can sideload manually for testing, but I continuously receive the following error:
(×) Error: M365.PackageServiceError: Request failed with status code 400 (tracingId: 00-4b31e672f71150562775ce2b30b2262e-1ceada67fb7a26a8-01) BadRequest: Sideloading rejected by Exchange
Removing the Hosts block my VersionOverrides section in my manifest allows the add-in to load normally. The ExtensionPoint in the code block comes from the Microsoft example for the DetectedEntity event.
Below is my complete manifest.xml file. There are taskpane elements in the manifest for testing but I ultimately do not want any UX in the add-in.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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:mailor="http://schemas.microsoft.com/office/mailappversionoverrides"
xsi:type="MailApp">
<Id>0589d295-bfb8-465d-8baa-7eeebfbb75ax</Id>
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Link detection"/>
<Description DefaultValue="Link detection"/>
<IconUrl DefaultValue="https://localhost:3000/assets/icon-64.png"/>
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-128.png"/>
<SupportUrl DefaultValue="https://www.contoso.com/support"/>
<AppDomains>
<AppDomain>https://www.contoso.com</AppDomain>
<AppDomain>https://localhost</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Mailbox"/>
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.8"/>
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/>
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteItem</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
</Rule>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<Requirements>
<bt:Sets DefaultMinVersion="1.8">
<bt:Set Name="Mailbox"/>
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<ExtensionPoint xsi:type="DetectedEntity">
<Label resid="Context.Label"/>
<SourceLocation resid="Commands.URL" />
<Rule xsi:type="RuleCollection" Mode="And">
<Rule xsi:type="ItemIs" ItemType="Message"/>
<Rule xsi:type="ItemHasRegularExpressionMatch" RegExName="videoURL" RegExValue="http://www\.youtube\.com/watch\?v=[a-zA-Z0-9_-]{11}" PropertyName="BodyAsPlaintext"/>
</Rule>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/icon-16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html"/>
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GroupLabel" DefaultValue="Link Analysis"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="Analyze Email"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Analyzes the email content."/>
<bt:String id="Context.Label" DefaultValue="Analyze domains"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>