Sage 200 Professional - "No sites returned" when running get sites in the Test Sage 200 API tool
Description

After following these steps to set up the Sage 200 API, there have been occasions after downloading and installing the Test Sage 200 API presents the following screen:

NOTE: If you log into the Sage 200 Online Services page and get an "Authentication Error", these steps below will not resolve this issue. You will need to request Cloud ID credentials from the Developer Support team in this instance. More information can be found here.

Cause
Resolution

Below is a checklist of areas to check to make sure the API has been correctly configured:

  • Is your Sage server turned on?

    Make sure that the Sage 200 server is turned on. When you have installed the Azure Application Proxy tunnel, there are services which communicate with Azure and allow the API to communicate with Sage.

  • Did you receive an error message when installing the Azure Application Proxy tunnel?

    It may have been that when you have attempted to install the tunnel to connect Sage 200 and Office 365, you received the following error message - 
    "AADST650052: The app needs access to a service that your organization has not subscribed to or enabled. Contact your IT Admin to review the configuration or your service subscriptions."

    If you have received this error message, this means that the Microsoft 365 account you are logging in with has not yet been associated with the Sage Business Centre. You should have received an email from [email protected] detailing how to onboard your Office 365 subscription. 

    If you have not received this email:
    Sage 200 Standard Online customer - please contact Technical Support on 0191 479 5955 and ask to check the email address the onboarding email went to.
    Sage 200 Professional customer - speak to your Sage Accredited Business Partner.
    Sage 200 Business Partner - raise a case through Case Management, or call 0191 479 5933 with your clients details and the correct email address they want the onboarding email sent to.

  • Check the API tab within System Administration

    There are 3 states that the API tab will show: Disabled, PendingAuthorisation or Enabled. Please see the following steps to resolve:

    Disabled - This means the API has not been set up. Please make sure you have followed this article on setting the API up and that your Office 365 registration has been onboarded.

    PendingAuthorisation - This means that you have used an email address that is not an admin@ email address. To utilise the API, this must be enabled by our Technical Support team.
    If you are a Sage 200 Professional customer, inform your Business Partner your API registration needs to be enabled.
    If you are a Sage 200 Business Partner, raise a case through Case Management, or call 0191 479 5933 with the following information: Site Name, Site URLthe email used to set the API up. 
    Once this has been enabled by Technical Support, you can go to Action > Refresh and the API will show as Enabled immediately.

    Enabled - The API tab is populated automatically when running the Application Proxy Tunnel installer. If you have received a message from the installer stating that the installation was completed, move on to the next step. If you have edited this tab and input your details manually, click on Edit and untick the API enabled box. This will remove all API entries, allowing you to onboard correctly using this article.

    TIP: If you have recently reset your Office 365 password for the account you used when setting up the Azure Active Directory Tunnel, you will be prompted to re-enter your password. This has also been seen to correct issues with no sites returned.

  • "An error has occured! Please see log files for more details" when attempting to add a Sage ID in for a user in System Administration

    This error occurs when you are trying to add a Sage ID in the API for a user in System Administration. You would need to go to inetpub/Sage 200 App Services/Sage200SecuredServices/logs to view the detail of the error.
    The most likely reason for this error is that you have entered the same email address twice for 2 different users in the Sage ID tabs, or you have unticked the Azure AD tickbox against the user who has set up the API initially.

    CAUTION: Never untick the Azure AD tickbox against the user who has installed the tunnel. This will cause the API to break. Similarly, you should only have 1 Sage ID email address per user in System Administration.

    The quickest way to resolve this error and to correct any mistakes is to disable the API, and uninstall the Application Proxy Installer. This article will talk you through how to do this.

 

  • System Administration crashes when you are attempting to open the API tab

    It has been seen when incorrect credentials have been entered into the login box that is prompted when trying to access the API tab, this will cause the entire of System Administration to close unexpectedly. This will continue to do so every time you select the API tab.
    The quickest resolution would be to speak to our Technical Support team, who can advise you which email address the API was initially set up with. When you have this email address, install System Administration on another PC on the network and attempt to log in and access the API tab. This should then allow you to successfully disable the API.

    NOTE: If you have followed this step, and are still unable to get in to disable the API you will need to speak to Technical Support to walk through manually removing the API link in SQL. Please note as well that by doing this, there are additional steps required to remove information from our side. The Technical Support team will advise you what they require from you before proceeding.
  • The Native API application is missing from within Azure Active Directory

    As part of the installation of the Azure Active Directory Tunnel, the installer will talk you through how to create an on-premise gateway which is required to allow the API to communicate to your Sage server via the Azure Tunnel. The application can be found by logging into aad.portal.azure.comEnterprise ApplicationsAll applications and should look like this:



    If you cannot see this application:

    - Re-open the AppProxyInstaller.exe file from within the installer folder.
    - There will be an option to click on Reconfigure at the top. Click this.
    - When prompted, log in with the same Microsoft 365 account used when you set the API up.

    The form will now populate in step 8 with the Native Name and Native Internal URL required to create the application. Leave the installer open and follow the steps documented above to create the application.

 

  • Are the Azure Active Directory Services running on your Sage server?

    When you install the Azure Active Directory Proxy tunnel, there are 2 services which are created:



    These services can be found by typing in services.msc in the search box in the bottom left hand corner and opening the Windows Services.
    If they are stopped, right click on them and choose Start.

    If they are missing, this means the Application Proxy Tunnel has not been installed. Please see this article on setting up the Native API.

 

  • The Application Proxy is disabled

    On very rare occasions it has been seen that the Application Proxy has been disabled on the Azure Active Directory side.
    To determine whether this is the problem, go to aad.portal.azure.com, log in and go to Enterprise ApplicationsApplication proxy and you should see this screen:



    If the proxy is disabled, the status will be Inactive and there should be an option to Enable application proxy at the top.

    NOTE: If your screen resolution is lower than 1920x1080 or your window is not maximised, the page will look like this below. In this case, click on the 3 dots next to Configure an App and choose the option to Enable application proxy

     
  • There is a problem with your Microsoft 365 tenant

    When the API has been successfully configured, you should be able to return a 1 in your browser by typing in the following URL:
    https://sage200nativeapi-yourtenantname.msappproxy.net/Sage200NativeAPI/internal/api_status

    TIP: You can find this URL in the API tab in System Administration - this is your site URL.

    If everything has been configured correctly as above, and you receive any error when accessing this URL outside your network, you will need to consult with Microsoft about what could be wrong with the tenant. Once Microsoft have resolved any issues that may have arisen, please revisit this article to work back through the steps again.

 

NOTE: If there is a scenario in this article that has not been covered that has been seen to resolve the issue of "No companies setup in Sage 200", please speak to Technical Support and we will look to update this article with further suggestions.

 

 

Steps to duplicate
Related Solutions