Specifies an additional domain that Office should trust, in addition to the one specified in the SourceLocation element. Specifying a domain has these effects:
- It enables pages, routes, or other resources in the domain to be opened directly in the root task pane of the add-in on desktop Office platforms. (Specifying a domain in an AppDomain isn't necessary for Office on the web or to open a resource in an IFrame, nor it is necessary for opening a resource in a dialog opened with the Dialog API.)
- It enables pages in the domain to make Office.js API calls from IFrames within the add-in.
Add-in type: Content, Task pane, Mail
- The value of the AppDomain element must include the protocol (e.g.,
- If there is an explicit port for the domain, include it (e.g.,
- If a subdomain needs to be trusted, include it (e.g.,
<AppDomain>https://mysubdomain.myappdomain.com</AppDomain>). The subdomain
mydomain.comare different domains. If both need to be trusted, then both need to be in separate AppDomain elements.
- Listing the same domain as the one specified in the SourceLocation element has no effect and may be misleading. In particular, when you are developing on
localhost, you don't need to create an AppDomain element for
- Don't include any segments of a URL past the domain. For example, don't include the full URL of a page.
- Do not put a closing slash, "/", on the value.
For more information, see Office Add-ins XML manifest.