Web Services for Microsoft Dynamics GP allows external applications to integrate with the Microsoft Dynamics GP application.

Typically, it is installed one-to-one against a single instance of Microsoft Dynamics GP. There are however environments that have multiple instances of Microsoft Dynamics GP installed. In order for each of these instances to utilize the Web Services, it would require multiple installations of Web Services.  Each Web Services installation would need to be on its' own server for each instance of Microsoft Dynamics GP.  You can only install one instance of Web Services per server.

This can however be simplified by utilizing the Tenant Services for a multi-tenant Web Services. This will allow a single installation of Web Services to handle integrations for multiple instance of Microsoft Dynamics GP.

I am going with the assumption that you have experience with deploying Web Services and Web Components, and will not include information that can be found in each products' respective administration/installation guides.

Installation of Tenant Services

Before beginning the installation of Tenant Services, keep in mind that you will need two separate users as a service account; one as the Discovery Service user and the other as the Management Service user.

After the installation is complete, the Tenant Services Configuration Wizard will guide you through creating the DYNGPDISCOVERY database for Tenant Services.

Installation of Web Components

The installation of Web Components is required in order to access the Web Management Console to administer Tenant Services. Please refer to the Web Component documentation for any prerequisite required for Web Components.

1. Make sure to select Custom at the Installation Option as the Single Machine will not present you with the correct options required for this installation.
In the Select Features screen, you will only need to select Tenant Manager under the Web Management Console; all other features can be marked as not available.

2. Specify a user and/or group in the Windows User Group screen under Web Management Console Users. This will be the users that will be able to login to Web Management Console to administer Tenant Services. Make sure to include the Tenant Services' Discovery Service user either into this field, or a group specified in this field.

3. Enable multi-tenant on Web Component and check the Deploy for multiple tenants checkbox and enter the service URLs in the Tenant Configuration screen in the installer. This is the an area that you may encounter an error. Make sure that you run the Web Component installer as the Tenant Services' Discovery Service user during this installation.

4. In the Web Management Console Configuration screen, enter a user that will be used as the IIS App Pool user for the Web Management Console. Make sure not to use the same user as the Tenant Services' Discovery Service user. Also keep in mind that the Web Site drop down window will only show IIS web sites that already have been setup with SSL and proper HTTPS binding.

After the installation is complete, the Web Component Configuration Wizard will guide you through creating the GPCONFIGURATION database for Web Component.

Setting Up Multi-Tenant, Part 1

Open a browser and browse to the Web Management Console, typically the address will be https://servername/WebManagementConsole. You will be prompted for username and password. Login as the Tenant Services' Discovery Service.

If for any reason you are repeatedly prompted for username and password, before receiving an access denied message, try accessing the Web Management Console from a different workstation. If you are able to login without any issue from a different workstation, this is typically caused by a loop back policy preventing login to the page locally from the server.

Tenant Manager located on the bottom left of the navigation bar. Enter the Tenant Services Management URL when prompted, and you will be presented with the administration options for Tenant Services.



Tenant Service Users

To allow another user to query tenant services, you will want to add another Service Admin user.

Click on Users on the navigation tab on the left then click on Add on the top navigation bar. Note that this is not the same as the Tenant Users located on the top navigation bar.

Enter the user you would like to be added as the Service Admin in both the Name and Identity field. Make sure that you are using the DOMAIN\USERNAME format. User Type should be Service Admin, and Status Active.

Click Save to complete.

Installation of Web Services

To enable multi-tenant on Web Services, you need to check the Deploy for multiple tenants checkbox and enter the service URLs in the Multi-tenant Configuration screen in the installer. This is the other area that you may encounter an error. Make sure that you run the Web Services installer as either the Tenant Services' Discovery Service user, or one of the Tenant Service Admin added in the Web Management Console during this installation.

Each of the service URLs can be found within the following configuration file under the <baseAddresses> tag if needed:

  • Discovery Service
    C:\Program Files\Microsoft Dynamics\Tenant Services\DiscoveryService\Microsoft.Dynamics.MultitenantServices.Discovery.config
  • Management Service
    C:\Program Files\Microsoft Dynamics\Tenant Services\ManagementService\Microsoft.Dynamics.MultitenantServices.Management.config

In the Application User Account screen, enter a user that will be used as the Web Services service user. Make sure not to use the same user as the Tenant Services' Discovery Service user.

For those who have installed Web Services on a single tenant environment, you may notice that there are several options that are not presented, such as the SQL Connection Information and Dynamics Security Data Store. This is normal, as SQL connection and security data store settings will be setup and handled at the Tenant Services level.

Also keep in mind that unlike the single tenant installation, the user you are logged into the server as will not be the default administration account for Web Services.

Setting Up Multi-Tenant, Part 2

Tenant Applications

Click on Applications on the navigation tab on the left then click on Add on the top navigation bar. Select Add default applications then click Save. This will add the default Applications we will need to setup a tenant.

Tenants

Last but not least, we will be adding all the instances of Microsoft Dynamics GP as a tenant to allow the Web Services integration.

Click on Tenants on the navigation tab on the left then click on Add on the top navigation bar. Enter a Name and Description for the tenant and change the Status to Active.

Next click on the checkbox next to Web Services for Microsoft Dynamics GP, this will present you with the parameters below:

  • DynGPSQLServer
    The SQL Server for the Microsoft Dynamics GP instance for this tenant.
  • DynGPSystemDB
    The Microsoft Dynamics GP system database for this tenant, typically DYNAMICS.
  • DynGPWebServiceURL
    The Web Services service URL. Service URLs can be found within the following configuration file under the <baseAddresses> tag if needed:
    C:\Program Files\Microsoft Dynamics\GPWebServices\ServiceConfigs\DynamicsGP.config
  • SecAdminServiceURL
    The Web Services Security Admin service URL. Service URLs can be found within the following configuration file under the <baseAddresses> tag if needed:
    C:\Program Files\Microsoft Dynamics\GPWebServices\SecurityAdminService\DynamicsSecurityAdmin.config
  • SecServiceDB
    The security store database for Web Service for this tenant. This will be created automatically, if it does not exist already.
  • SecServiceSQLServer
    The SQL Server for Web Service for this tenant. Typically, this will be the same as DynGPSQLServer.

Once you have entered all the information, press Save to complete. Repeat these steps to add additional tenants.

Tenant Users

Finally, you will need to add users that are allowed to access the tenants that you have setup. If you have navigated away, click on Tenants on the navigation tab on the left, select a tenant from the list you would like to add a user to, then click on Tenant Users on the top navigation bar.

Click on the green plus button to add a new blank field where you will be entering the user information, this will present you with the parameters below:

  • Name
    Typically only used on Web Client, enter the username without the domain information.
  • Identity
    Enter the username. Make sure that you are using the DOMAIN\USERNAME format. If you are continuously receiving an invalid identity error when entering a username, check the Security log in Event Viewer. Typically, there is a login restriction for one of the service accounts.
  • Admin
    Checking this box will allow this user to access the Web Services Security Console and Exception Console.
  • Status
    Usually you will want this as Active.

Once you have entered all the information, press Save to complete. Repeat these steps to add users.

Setting Up Web Services

You will need to run the GP Web Services Configuration Wizard before each tenant can utilize Web Services. Once you open the wizard and proceed past the welcome screen, you will be presented with a Tenant Selection Screen, if everything has been setup correctly up to this point. This is another area that you may encounter an error. Make sure that you run the GP Web Services Configuration Wizard as either the Tenant Services' Discovery Service user, or one of the Tenant Service Admin added in the Web Management Console during this installation.

Once you select a tenant, you will be presented with the Connection Information screen. You cannot modify any value on this screen. The reset will be the same process as when deploying a single tenant installation of Web Services.

System Setup screen will perform a Microsoft Dynamics GP's System ISO Verification, and Functional Currency Verification. If you receive a red X mark in this screen, please refer to the Web Services Administration Guide.

Select the companies you would like to use Web Services on the Company Selection screen. Multiple companies can be selected by holding down shift/ctrl while clicking on the company name. Confirm this in the Summary screen, select Yes when prompted whether to continue with the install, and it will start deploying the Web Services database object for each selected company.

Once the deployment is complete, select Yes when prompted whether to restart the Web Services service. Repeat these steps to deploy all additional tenants.

Administering Web Services

Both Dynamics Security Console and Dynamics GP Web Service Exception Management Console will present a Tenant selection window.

Same rules apply and the user must be a Tenant Services' Service Admin as well as added to the Tenant as an Admin user. Tenant Services' Service Admin give the user the ability to query the Tenant Service, in this case to bring the Tenant list for the Tenant selection window. The admin rights to the tenant actually give the user rights to access the Dynamics Security Console and Dynamics GP Web Service Exception Management Console.


Note:

When attempting to Approve a workflow via the e-mail link for Web Services in a Multitenant environment, you may receive a "Request Error" in the web browser.  This functionality was added in Microsoft Dynamics GP 2018 and later.


Thank you!
Karl Hendrickson
Microsoft Dynamics GP Support Engineer