Skip to main content

Resolving The tenant 'default' is not accessible error or Regenerating new symbols for Business Central On-Premise for customised Database

Problem Statement:

Disclaimer: 
This blog is only applicable for Business Central On-Premise Version. If you are stuck in the same issue, try this at your own risk. 

I had installed Business Central v14 (Spring 2019) On-Premise with LS Retail. In this, Business Central comes with a ready made setup to connect with VS Code. As I restored the DB given by LS Retail, I could no longer connect to VS Code. This could be a potential case of Running C/SIDE and AL Side-by-side or customising on top of LS Retail.

Despite all the configurations being correct in project's app.json and launch.json, I could no longer connect to Business Central, I couldn't download any Symbols and I couldn't publish any Extension to Business Central. 
App.json and Launch.json

I checked all BC Administration setup for Development and it seemed to be perfectly fine. I had Enabled Development Endpoint,  Development Endpoint Port was 7049Target was set to Internal, Enable Debugging was Enabled.
Development Endpoint - BC Administration
I checked my Permissions were set to SUPER, I had setup the WebServiceKey.
User Card
I had also checked my Developer License but still had the same thing 

This is where I noticed that, even after reverting back to the standard Demo BC(14-0) Database no longer helped. The only error I got was "The tenant 'default' is not accessible error".

I tried changing the AL Language Extension for VS Code guessing this could be a potential issue that BC v16 AL Language might not be able connect to BC v14.

Also, to ensure I created a new Server Instance and Web Server Instance, and tried connecting the same error "The tenant 'default' is not accessible error"
AL Project : The tenant 'default' is not accessible
I even tried a fresh install of BC but I simply couldn't figure out!!

Pre-requisites:


  • Microsoft Dynamics Business Central On-Premise DVD
  • AL Language Extension
  • VS Code
  • Basic Understanding of PowerShell

Books & References:

Resolution:

When it comes to a new Database, the Symbols for the DB used are not pre-generated.
AL Extension requires this symbol to be installed for symbols to be downloaded in the project for compilation process.
When these new symbols for different Database are generated, it also checks if the Data version is as per the latest version prior to publishing these new Symbols to the Database.

Importing the NAV-Admin module in PowerShell.
Import-Module NAV-Admin
Refresh the Command in Command Add-On in PowerShell

1. Checking if the Symbols are present for newly restored Database using Get-NAVAppInfo command:
Get-NAVAppInfo -ServerInstance <SERVERINSTANCENAME> -SymbolOnly
If you notice, you will see that the Application.App NAV-App is not installed.

2. You need to Generate the Application Symbol App:
i. From C/SIDE Development Environment, export all the objects into a single .txt file excluding the Codeunits >= 2000000001.

ii. Move this .txt file into a folder making sure that the folder has only this .txt exported of the objects

iii. Running the SymbolReferenceGenerator <Source Folder> <Output Package File Name> <Package Name> <Package Version> [<GenerateDevelopmentPackage>] command

Generate Symbols

3. Publish the NAV-App as Symbols Only:
This command will Publish Applications.app as Application symbols so that it can be downloaded inside AL Project.
Publish-NAVApp

4. Check if  NAV-App is installed:
This step will make sure that your NAVApp in compiled with the latest symbols and installed in BC.
Get-NAVAppInfo with Application.app

5. Check if AL Extension in VS Code can connect to Business Central:
After Restarting the Business Central Instance, I tried to connect to AL Project with Business Central Server.
AL Project: Symbols have been downloaded
Finally, I got it running and now I can deploy the Extension App to Business Central.

Conclusion:

Thus in this blog we saw how to enable customising using AL Extensions for a database that has already been customised by a 3rd Party.
I would like to share the acknowledgement of this blog to Mr. Manoj from Microsoft Support Bangalore for sharing his research and content and helping me in this issue.
I hope this helps!

Comments

  1. Great!
    I didn’t know about the SymbolReferenceGenerator tool.
    Another option could be to download the symbols extension from a W1 database and install that extension in your database.
    After that you should be able to connect and run finsql.exe with generatesymbolreference command parameter and there’s no need to export the objects text file.

    ReplyDelete
  2. Hi,
    Yes your method is right and would serve perfectly for standard BC. But I had installed LS Retail Objects in C/SIDE because of which I had to export the Text files to generate a BC + LS Symbol Reference.

    Thanks for your comment as things got more clear!

    ReplyDelete
  3. Yes. My method is just to let you bypass the “tenant is not accessible” error and connect to Business Central.
    Even in your database, with LS Retail, if you install the standard symbols extension, you should be able to connect VSCode to BC.
    But yes, after that you’ll have to run finsql with the generatesymbolreferences command parameter to update the symbols to include LS Retail objects. But no need to export files.

    But many thanks for your article. I didn’t know about the SymbolReferenceGenerator application.

    ReplyDelete
  4. That makes sense..
    Actually the export is necessary for SumbolReferenceGenerator.exe
    I couldn't run the finsql generatesymbolreference as it would give me limit upto 47 character other wise it would throw an error.
    Thanks for your response I will consider it the next time.

    ReplyDelete

Post a Comment

Let me know your comments below. I'll try my best to answer your comment

Popular posts from this blog

Something went wrong. An Error occurred - Error Resolution

Introduction: With the installation of NAV 2018 or BC On-premise, I have observed that when creating New Server Instance and New WebServer Instance, you will get the error 'Something went wrong. An Error occurred '. I referred to the community questions below but didn't find my resolution. Hence, I decided to write this blog. Pre-requisites: Microsoft Dynamics Business Central - On-Premise / NAV 2018 Understanding of Business Central Authentication  Books & References: https://community.dynamics.com/nav/f/microsoft-dynamics-nav-forum/261301/nav-2018-web-client-an-error-has-occurred https://community.dynamics.com/business/f/dynamics-365-business-central-forum/421987/error-something-went-wrong-an-error-has-occurred-azure-ad-tenant Demonstration: 1. Creation of NAVServerInstance: In order to create NAVServerInstance, you can either add the Server Instance through Business Central Administration or Powershell command. Add Instance - Business Central Administration Add Insta

Setting up OAuth Authentication for Business Central Web Services / APIs

Introduction: After upgrading Business Central to version 17 (Wave2 2020), I found that there was an error telling me that WebService Key is going to be deprecated soon. Web Service Access Key is deprecated. Hence, I decided to explore and probably make it easier through this blog. Pre- requisites : Admin Access to Office 365 Admin Access to Azure Demonstration: 1. App Registration on Azure Portal: To enable OAuth authentication for any apps in Azure Active Directory, you will need to perform App Registration and set up the permissions and security details. i.) Register the App: Search for 'App Registration' on the Azure Portal. Click on New Registration Type in the App Names, Account Types and Redirect URI. Registering Application ii.) Setup API Permissions: Go to API Permissions > Add Permissions > Business Central App > Select Delegated Permissions > Select Other Permissions and Financials > Add Permissions Button. Setup API Permissions iii.) Setup Client Secr

How to Upgrade Data from Microsoft Dynamics NAV to Microsoft Dynamics Business Central On Premise - Part 2

 Introduction: Now that the first step of the problem preprocessing of the NAV Database to make it ready to be migrated to BC is done(refer Part 1 ), we can now proceed further with connecting the database in Business Central On-Premise. Pre- requisites : Microsoft Dynamics 365 Business Central Microsoft Dynamics for NAV Microsoft SQL Server Management Studio (SSMS) Powershell ISE Understand NAV to BC Upgrade Considerations -  Click here Understand Upgrade Path -  Click here Books & References: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/upgrade/upgrade-considerations#online https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/upgrade/upgrade-paths https://www.sauravdhyani.com/2018/10/msdyn365bc-data-upgrade-to-microsoft.html https://olisterr.blogspot.com/2022/03/how-to-upgrade-data-from-microsoft.html https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/upgrade/upgrade-permissions Demonstration: 1. Install Business