web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Cannot download symbols from Sandbox: authentication fails

(0) ShareShare
ReportReport
Posted on by 335

Hello,

I am new to Business Central. I have installed a BC docker container, using the Powershell script from Microsoft.

Install went well, and sandbox is running. I can open BC website.

Unfortunately I cannot load the symbols from Visual Studio Code.

I already came across many topics, blogs, ... but none are helping.

Anyone has any idea?

This is my launch .json:

{
    "version""0.2.0",
    "configurations": [
        {
            "name""D365BC",
            "request""launch",
            "type""al",
            "environmentType""Sandbox",
            "server""http://D365BC",
            "serverInstance""BC",
            "authentication""UserPassword",
            "startupObjectId"22,
            "startupObjectType""Page",
            "tenant""default"
            
        }
    ]
}
This is my app.json:
{
  "id""<hidden>",
  "name""ALProject1",
  "publisher""Default publisher",
  "version""1.0.0.0",
  "brief""",
  "description""",
  "privacyStatement""",
  "EULA""",
  "help""",
  "url""",
  "logo""",
  "dependencies": [],
  "screenshots": [],
  "platform""17.0.0.0",
  "application""17.0.0.0",
  "idRanges": [
    {
      "from"50100,
      "to"50149
    }
  ],
  "contextSensitiveHelpUrl""">ALProject1.com/.../",
  "showMyCode"true,
  "runtime""6.0"
}
I want to download the symbols.
I do the following:
">AL: Download symbols".
But it keeps returning me an authentication error.
The output I am getting:
Sending request to d365bc:7049/.../packages
[2021-01-06 16:44:29.24] Sending request to d365bc:7049/.../packages
[2021-01-06 16:44:29.24] Authorization has failed or the credentials have expired. The credential cache has been cleaned. Any access to reach Business Central would require new authorization.
Help is greatly appreciated.
Kind regards
I have the same question (0)
  • rabbit1986 Profile Picture
    335 on at
    RE: Cannot download symbols from Sandbox: authentication fails

    I already figured out I was probably using the wrong version in my app.json.

    Visual studio code now returns me the same error, but when I try the URL it gives me in the output in a browser I can download the .app files.

    So my guess is I'm getting closer.

    App.json:

    {

     "id": "6efa3ee0-450a-4517-b52d-600243b67b8b",

     "name": "ALProject1",

     "publisher": "Default publisher",

     "version": "1.0.0.0",

     "brief": "",

     "description": "",

     "privacyStatement": "",

     "EULA": "",

     "help": "",

     "url": "",

     "logo": "",

     "dependencies": [],

     "screenshots": [],

     "platform": "16.0.14073.14279",

     "application": "16.3.14085.14363",

     "idRanges": [

       {

         "from": 50100,

         "to": 50149

       }

     ],

     "contextSensitiveHelpUrl": "ALProject1.com/.../",

     "showMyCode": true,

     "runtime": "6.0"

    }

    Output:

    [2021-01-07 13:10:07.44] Sending request to d365bc:7049/.../packages

    [2021-01-07 13:10:07.44] Sending request to d365bc:7049/.../packages

    [2021-01-07 13:10:07.45] Authorization has failed or the credentials have expired. The credential cache has been cleaned. Any access to reach Business Central would require new authorization.

    The authentication has been cancelled

  • Suggested answer
    Mohana Yadav Profile Picture
    60,961 Super User 2025 Season 2 on at
    RE: Cannot download symbols from Sandbox: authentication fails

    Are you using default ports only?

    is 7049 correct?

  • Verified answer
    srttel Profile Picture
    on at
    RE: Cannot download symbols from Sandbox: authentication fails

    Hi,

    generally, not easy to tell you on spot what is missing, but when you are running latest sandbox the system is created a multitenant.

    Then you would need a another parameter in the launch.json which is called tenant = “xxx”

     "version": "0.2.0",

       "configurations": [

           {

               "name": "Your own server",

               "request": "launch",

               "type": "al",

               "environmentType": "Sandbox",

               "server": "http://my",

               "serverInstance": "BC",

               "authentication": "UserPassword",

               "startupObjectId": 22,

               "startupObjectType": "Page",

               "breakOnError": true,

               "launchBrowser": true,

               "enableLongRunningSqlStatements": true,

               "enableSqlInformationDebugger": true,

               "tenant": "default"

    You might make sure you are using the latest version of AL language from the marketplace

    And install the New-BcContainerHelper BcContainerHelper | Freddys blog which will help you with the work of containers.

    This New-BcContainerHelper offers as well a handy command called - New-BcContainerWizard

    This will guide you to the various options and create the script for you which you can afterwards run in PowerShell.

    With this you know better how the docker container was created and switches you need in the launch.json.

  • rabbit1986 Profile Picture
    335 on at
    RE: Cannot download symbols from Sandbox: authentication fails

    I will try to do the wizard, thanks for the tip. 

    The point I have reached so far is the following:

    When I surf with edge to the url, that is outputted in VSCode, it downloads two "app" files. So my guess is that the port is correct:

    Browsing this: d365bc:7049/.../packages returns me System ... .app file
    I also found that when changing "authentication" in the launch file to "Windows", it seems to take longer: it takes a lot longer to connect, but then it says:
    Processing of message 'al/downloadSymbols' failed with error: 'No credentials are available in the security package'

    A last thing I might try is this:
    At the end, it says "I Started a NAV Instance with Credentials NavUserPassword". Anyone knows how I do this? 
    Your help is already much appreciated !
  • rabbit1986 Profile Picture
    335 on at
    RE: Cannot download symbols from Sandbox: authentication fails

    I suppose, as when browing the url it returns me a download

  • Suggested answer
    Mohana Yadav Profile Picture
    60,961 Super User 2025 Season 2 on at
    RE: Cannot download symbols from Sandbox: authentication fails

    may be a silly question.

    When you use Download Symbols command, it will prompt to enter username and password on top. (I forget about it sometimes). are you providing the username and password without missing?

  • Suggested answer
    srttel Profile Picture
    on at
    RE: Cannot download symbols from Sandbox: authentication fails

    Well, when the container is created with authentication type NavUserPassword and you are using UserName then this will not match together. You need to use the same authentication type in launch.json as the container was created. Here is a list of authentication types which BC supports - docs.microsoft.com/.../users-and-credential-types

  • rabbit1986 Profile Picture
    335 on at
    RE: Cannot download symbols from Sandbox: authentication fails

    It seems I setup the container with the standard script that contains the following:

    $credential = get-credential -UserName $env:USERNAME -Message "Using Windows Authentication. Please enter your Windows credentials."
    New-NavContainer -accept_eula:$accept_eula `
    -containername $containername `
    -auth Windows `
    -Credential $credential `
    -alwaysPull `
    -doNotExportObjectsToText `
    -usessl:$false `
    -updateHosts `
    -assignPremiumPlan `
    -shortcuts Desktop `
    -imageName $navdockerimage `
    -additionalParameters $additionalParameters

    Setup-NavContainerTestUsers -containerName $containername -password $credential.Password

    I would expect if I simply set my launch.json to "Windows", it would be able to login using my windows credentials?

    Instead it gives me:

    System.ComponentModel.Win32Exception (0x8009030E): No credentials are available in the security package
     
    Do II guess this is wrong then? Because my login in Business central is BC\<mywindowsusername>  
    I guess I should have set it up the container with the "-auth NavUserPassword" instead?
  • Suggested answer
    Mohana Yadav Profile Picture
    60,961 Super User 2025 Season 2 on at
    RE: Cannot download symbols from Sandbox: authentication fails

    I think NavUserPassword is best for containers so that we can add multiple logins and test with different permissions etc.

  • rabbit1986 Profile Picture
    335 on at
    RE: Cannot download symbols from Sandbox: authentication fails

    Super, I'll try that :) I'll let you guys know !

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,202

#2
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 3,248

#3
Sumit Singh Profile Picture

Sumit Singh 2,893

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans