Microsoft Dynamics NAV as an App for SharePoint

You can set up Microsoft Dynamics NAV to be available as an app for SharePoint. This means that Microsoft Dynamics NAV data can be shown in a SharePoint site, and that you can modify the data on the SharePoint site through the Microsoft Dynamics NAV Web client.

You can deploy Microsoft Dynamics NAV as an app for SharePoint Online and SharePoint on-premises.

SharePoint and Microsoft Dynamics NAV

If you set up a SharePoint site, you can add Microsoft Dynamics NAV as an app to the site so that the Microsoft Dynamics NAV Web client opens when the user chooses an icon. Then, you can add web parts that show Microsoft Dynamics NAV data, such as a list of sales invoices with overdue payments. Users can drill down into the data and the web parts will open the relevant page in the Microsoft Dynamics NAV Web client when the user chooses an icon or a link.

For example, if you provide financial services to several subscribers, you want your subscribers to be able to see their data in a SharePoint site. In that case, you can create separate subsites for each subscriber so that they have access to only their data. Their data is stored in dedicated business databases, because you have deployed your Microsoft Dynamics NAV solution in a multitenant deployment architecture. You add Microsoft Dynamics NAV as an app so that users can open the Microsoft Dynamics NAV Web client when they choose an icon, and they are signed in to Microsoft Dynamics NAV automatically. Then, you add parts to show the subscriber’s list of unpaid sales invoices, or a chart that reflects top sales. When the user chooses the list of unpaid sales invoices, the underlying page from Microsoft Dynamics NAV Web client opens as a seamless part of the SharePoint site. The user can filter and modify the data without having to sign in to a new site.

Warning

The users' access to Microsoft Dynamics NAV is not restricted to the page that you expose in SharePoint. You must assign the relevant permissions to each user in Microsoft Dynamics NAV.

You can set up a site collection with a site for each subscriber to your services, or you can set up a single site with general information. In this scenario, your Microsoft Dynamics NAV implementation is most likely to be a multitenant deployment with a tenant for each of your subscribers. But you can choose other deployment scenarios, such as using Microsoft Dynamics NAV companies in shared databases for your subscribers. Similarly, you can deploy Microsoft Dynamics NAV as an app for SharePoint that is used internally exclusively by users in your own organization. In general, the configuration of the app and how Microsoft Dynamics NAV and SharePoint interact are the same in both scenarios.

Building an App for SharePoint

In order to add Microsoft Dynamics NAV as an app to a SharePoint site, you must create a provider-hosted app for SharePoint in Visual Studio. This includes configuring an appManifest.xml file, so that the app can be added to a site. The app manifest describes metadata such as the title, the publisher, and the start page for the Microsoft Dynamics NAV Web client so that the app will open the relevant Microsoft Dynamics NAV Web client address. Also, you can add one or more client web parts for the Microsoft Dynamics NAV pages that you want to show on the SharePoint site. You can choose to use an already existing page, or you can create specific pages that are only used for SharePoint. For example, you can create a part that is based on page ID 9305, Sales Order List. Then, you deploy the app to your SharePoint site, and you add the part as an app part that will show the page in the Microsoft Dynamics NAV Web client as a list of sales orders without navigation elements. The list resembles any other list in SharePoint, but it is the Microsoft Dynamics NAV Web client, and the data is current. For more information, see Embedding Microsoft Dynamics NAV Web Client Pages in Other Websites and Best Practices for Creating Apps for SharePoint.

Installing Microsoft Dynamics NAV as an App

When you have built your app for SharePoint in Visual Studio, you must publish it in order to create the deployment package. Depending on your scenario, you can deploy the app to SharePoint in different ways.

For example, you can publish the app to the SharePoint store so that it is accessible for others to install on their SharePoint sites.

If you want to install the app only on your own SharePoint sites, you can upload it to your SharePoint app catalog from where you can install it to the relevant SharePoint sites. For example, if you have a SharePoint site collection with a site that is used internally and a site that is publicly available. Then, you can add different parts to the two sites, such as a read-only part on the public site, and an editable part on the internal site. For more information, see Best Practices for Creating Apps for SharePoint.

SharePoint Online and SharePoint On-Premises

SharePoint Online and SharePoint on-premises support different authentication methods. This means that depending on your SharePoint deployment, you must configure Microsoft Dynamics NAV differently. The configuration applies to the Microsoft Dynamics NAV Server instances, the user setup, and the Microsoft Dynamics NAV clients that users can use.

For SharePoint Online, the following Microsoft Dynamics NAV configurations are available:

Client Type Microsoft Dynamics NAV Server Credential Type Authentication Mechanism

Microsoft Dynamics NAV Web client

AccessControlService

Windows Azure Active Directory

Microsoft Dynamics NAV Windows client

AccessControlService

Windows Azure Active Directory added to an Access Control Service (ASC) namespace.

Dn271706.Important(en-us,NAV.71).gifImportant
The Microsoft Dynamics NAV Windows client is currently not supported if the Microsoft Dynamics NAV deployment must be accessed by more than on Windows Azure Active Directory tenant.

For SharePoint on-premises that must be accessible from the internet so that SharePoint and Microsoft Dynamics NAV are publicly accessible, the following Microsoft Dynamics NAV configurations are available:

Client Type Microsoft Dynamics NAV Server Credential Type Authentication Mechanism

Microsoft Dynamics NAV Windows client

AccessControlService

Windows Azure Active Directory added to an Access Control Service (ASC) namespace.

Microsoft Dynamics NAV Web client

AccessControlService

Windows Azure Active Directory

-Or-

Windows Azure Active Directory added to an Access Control Service (ASC) namespace.

Important

If you use Windows Azure Active Directory as the authentication mechanism, your app for SharePoint must open the Microsoft Dynamics NAV Web client in full screen mode in SharePoint on-premises deployments. For more information, see Troubleshooting: Microsoft Dynamics NAV and SharePoint.

For SharePoint on-premises that must be accessible from an intranet so that SharePoint and Microsoft Dynamics NAV are accessed only on-premises, the following Microsoft Dynamics NAV configurations are available:

Client Type Microsoft Dynamics NAV Server Credential Type Authentication Mechanism

Microsoft Dynamics NAV Windows client

Windows

Windows authentication

Microsoft Dynamics NAV Web client

Windows

-Or-

AccessControlService

Windows authentication and

-Or-

Windows Azure Active Directory

Note

The security zones that the security mechanisms in Internet Explorer rely on can lead to unexpected behavior when users access the Microsoft Dynamics NAV Web client from SharePoint. For more information, see Troubleshooting: Microsoft Dynamics NAV and SharePoint.

For more information about how to achieve single sign-on between Microsoft Dynamics NAV and SharePoint based on Windows Azure Active Directory, see Authenticate Users with Windows Azure Active Directory.

For more information about how to achieve single sign-on between Microsoft Dynamics NAV and SharePoint based on Windows Azure Active Directory added to an Access Control Service (ASC) namespace, see How to: Change an ACS Configuration to Support Single Sign-On with Office 365 and SharePoint.

When you want to deploy apps to SharePoint on-premises, you must configure the SharePoint sites first. For more information, see Configure an environment for apps for SharePoint and Plan for apps for SharePoint 2013 on TechNet.

Apps for SharePoint and Multitenant Deployments of Microsoft Dynamics NAV

You can deploy Microsoft Dynamics NAV in a multitenant deployment architecture. Then, if you create an app for SharePoint that must access the Microsoft Dynamics NAV Web client, you must decide if you want to deploy the app for a specific tenant, or if the app can be used by all tenants that are mounted against a Microsoft Dynamics NAV Server instance.

If the app is used by more than one tenant, the app manifest for the app must point to the server and include the SPHostUrl parameter, such as https://www.solutions.com/DynamicsNAV/WebClient/?SPHostUrl={HostUrl}. Then, when the app accesses the Microsoft Dynamics NAV Web client, the SPHostUrl parameter identifies the SharePoint site where the app is installed. Since the SharePoint site is tenant-specific, this parameter identifies the tenant. However, you must enable a URL rewrite rule in the web.config file for the Microsoft Dynamics NAV Web client in order to translate the value of the SPHostUrl parameter into a tenant ID. The URL rewrite rule is defined in the <rule name="SPHostUrl to tenant" enabled="false" stopProcessing="true"> element in the web.config file that is located in the physical path of the web application for the Microsoft Dynamics NAV Web client. For more information, see How to: Enable URL Rewrite Rules for the Microsoft Dynamics NAV Web Client.

If the app applies to a specific tenant only, you must specify that tenant in the app manifest for the app. You can do this by specifying the tenant ID in the URL, such as https://www.solutions.com/DynamicsNAV/WebClient/?tenant=tenant1&{StandardTokens}. Alternatively, if you have configured the Microsoft Dynamics NAV Web Server components to accept host names, you can specify the host name in the URL in the app manifest.

See Also

Tasks

Troubleshooting: Microsoft Dynamics NAV and SharePoint

Concepts

Multitenant Deployment Architecture
Best Practices for Creating Apps for SharePoint
Authenticate Users with Windows Azure Active Directory