Sage 200 - Disabling and Enabling the Native API
Description

Follow these steps when:

If you are moving a configuration database containing API information, see the section below for considerations you need to take into account.

Cause
Resolution

NOTE: Sage recommends buying a single user Microsoft 365 tenant for testing purposes with the correct licence applied. Please see the supported licences. This makes the move from UAT to Live a straightforward process. If this is not possible and you will be using the same tenant for both test and live, please follow the steps below.

  1. Uninstall the Azure Application Proxy from the server.

Open the App Proxy Installer you used when setting up the Native API tunnel.

Choose Uninstall and log in with the Microsoft 365 tenant you originally used to set the Native API. Complete the uninstallation process.

2. Disable the API in Sage 200 System Administration.

Open System Administration. Select API and log in with your Microsoft 365 tenant details. You will see the API summary details, showing that the API is enabled and the site name and site URL.

Select Edit, then deselect the API Enabled setting. Confirm that you want to remove access to the API.

3. Remove API access for any users that were set to use the API.

Select Users.

If a user has API access, the API User column shows Yes

For each user with API access, right-click the user and select Properties.

Go to the API tab and deselect the Azure AD setting.

4. Delete the apps you created in Microsoft Entra admin center (formerly Azure Active Directory admin center).

Go to entra.microsoft.com/ and log in using your Microsoft 365 credentials.

Select Identity > Applications > Enterprise applications, then select All applications .

Select one of the following apps from the list: Sage200ContractAPI or Sage200NativeAPI.

 

The overview of the selected app is displayed.

Select Properties.

 

 

Select Delete to remove the app.

 

Repeat these steps to delete the other apps you have not yet deleted.

CAUTION: Do not delete the Sage Business Centre application. Doing this will offboard your tenant from Microsoft 365 and cause issues if you try to onboard again.

5. Reinstall the Azure App Proxy Installer. To set this up again, follow the steps in the article Setup of the Sage 200 Native API - using Microsoft Azure Active Directory Tunnelling.

 

Considerations when moving from one server to another

Consider the following when thinking about moving a configuration database from one server to another:

  • I am taking a copy of the data and configuration database offsite for investigation for a non API related query, but the API is set up in the live system?

If this is the case, you can continue to take a backup of both the company database and the configuration database. Before opening System Administration to load in the existing configuration database, you will need to break the link between this configuration database and the API, so that you can successfully update your users before testing.

CAUTION: Should you need to take this step, do not restore the configuration database back into the live setup. Doing so will break the live site connection to the API, which will require further work to repair. Any changes you need to make to the live configuration database should be done in the form of a script.

To break the link between the offsite configuration database and the API, run the following statement in SQL Server Management Studio: 

--delete the entry to the API
DELETE FROM tblParameters where ParameterName = 'APISiteID'

--delete API user entries
DELETE FROM tblExtIdentity where ExtIdentityTypeID IN (1,2)

--remove any API references to existing users
UPDATE tblUser
SET isAPIUser = 0
WHERE isAPIUser = 1

This will break the link and show this configuration database and the API as disabled. You can now continue to test as normal.

Steps to duplicate
Related Solutions