Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

outlook - Office 365 Manifest for command-only Add-In

I have an add-in that just contains two ExecuteFunction commands. In the generated manifest file from visual studio it contains the xml like:

<FormSettings>
    <Form xsi:type="ItemRead">
        <DesktopSettings>
            <SourceLocation DefaultValue="https://localhost:44351/MessageRead.html"/>
            <!--If you opt to include RequestedHeight, it must be between 32px to 450px, inclusive.-->
            <RequestedHeight>250</RequestedHeight>
        </DesktopSettings>
    </Form>
</FormSettings>

Since I don't have any UI in a task pane, why does it require this xml, and what would be the best practice here for my command-only add-in. Thanks.

question from:https://stackoverflow.com/questions/65890845/office-365-manifest-for-command-only-add-in

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This XML exists for compatibility with older Outlook clients and is required by the manifest schema.

As a best practice, since your add-in only uses add-in commands, set the minimum requirement set in the manifest to at least 1.3, so the manifest and this URL won't be used by clients that don't support add-in commands.

<Requirements>
  <Sets>
    <Set Name="Mailbox" MinVersion="1.3" />
  </Sets>
</Requirements>

Technically, this SourceLocation URL still appears in the payload of an identity token, so I would suggest setting it to a URL that's unique to your add-in.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...