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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Get Companies : Missing Data

(0) ShareShare
ReportReport
Posted on by 20

When calling the following endpoint GET /v2.0/{environment}/api/v2.0/companies (https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_company_get) , not all companies are sent. For example, my user has 5 companies in their Business Central 365 however, the API only returns 2 of them. Why is that case?

Does it have anything to do with permissions of the user or that of the application?

I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,417 Super User 2026 Season 1 on at

    hello

    but if you run the API in Production you should see them all

    confirm?

    does it only happen to you in sandbox?

    DAniele

  • Suggested answer
    Saurav.Dhyani Profile Picture
    14,419 User Group Leader on at

    Make sure you are targeting the right environment.

    Returning 2 means its pointing the wrong environment.

  • Suggested answer
    YUN ZHU Profile Picture
    99,084 Super User 2026 Season 1 on at

    Hi, is it a permission issue? I just tested it and it doesn't look like a problem.

    My test endpoint:

    https://api.businesscentral.dynamics.com/v2.0/d8f36038-1f93-4543-affc-5dc92b6ee871/Sandbox211/api/v2.0/companie

    In BC:

    pastedimage1669336507222v2.png

    In Postman:

    pastedimage1669336473061v1.png

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    DAnny3211 Profile Picture
    11,417 Super User 2026 Season 1 on at

    hi

    try this URL

    api.businesscentral.dynamics.com/v2.0/{enviroment}/

    api/microsoft/automation/v2.0/automationCompanies

    works 100%

    check my answer if it helped you, thanks

    DAniele

  • AniN Profile Picture
    20 on at

    Hi Daniele,

    I  check the environment in use - it is `production`.

    1. Do you know if there’s a way to check which environment was used during company creation?

    2. Could you please expand more on differences between “api/v2.0” and “automation/v2.0"?

    I tried “api/microsoft/automation/v2.0/automationCompanies”:

    {

       "error": {

           "code": "Internal_CompanyNotFound",

           "message": "Cannot process the request because the default company cannot be found. You can specify a default company in the service configuration file, or specify one for each tenant, or you can add a query string in the form of \"company=[name]\". You can see the available companies by accessing the default OData web service, Company. For more information, see \"OData Web Services\" in Help.  CorrelationId:  f9526a8a-d8af-4823-a74b-9f0d5c62cb50."

       }

    }

    3. I have tried “/api/microsoft/automation/v2.0/companies”: Only 2 companies of existing 5 were returned
    8015.image-_2800_2_2900_.png

  • AniN Profile Picture
    20 on at

    I checked the environment and I'm using production, and it matches that of the customer's environment as well. However, we are still seeing 2 companies out of 5.

  • Suggested answer
    Marco Mels Profile Picture
    Microsoft Employee on at

    Hello,

    Interesting, are you able to logon to these other 3 companies? Have they been initialized successfully since? Otherwise, raise a ticket to Microsoft support so we can assist by looking at the environment.

    Thanks.

  • AniN Profile Picture
    20 on at

    Hi Marco,

    Yes, the customer is Can you share where can I raise a ticket with Support and the info that I should provide for speedy resolution? Appreciate your help!

    Regards,

    Anindita

  • Suggested answer
    Marco Mels Profile Picture
    Microsoft Employee on at

    Hello,

    This is written here:

    learn.microsoft.com/.../manage-technical-support

    Thank you.

  • AniN Profile Picture
    20 on at

    This is happening in Production.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,946 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,177 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 555 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans