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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Issue with Get companies API

(0) ShareShare
ReportReport
Posted on by 26
am trying to integrate Salesforce with Business central. I am totally new to business central and learend hot to hit BC API.
So created application in Azure AD, and in BC have configured Azure Active Directory Application Card also and gave full permision also
 
 
//

and when I tried to get the get companies with the API https:/api.businesscentral.dynamics.com/v2.0/XXXXXXXXXXXXXXXX/Production/api/v1.0/companies

I am getting only below response in postman and not sure why other companies are not coming.

//

I have the same question (0)
  • YUN ZHU Profile Picture
    95,307 Super User 2025 Season 2 on at
    Hi, looks like a permissions issue, please remove the Company below.
    For example,
     
    Hope this helps.
    Thanks.
    ZHU
  • Community member Profile Picture
    26 on at
    Hi Yun Zu,
     
    I tried that also but still I am not able to get companies. I am struggling with this for the past few days and not able to figure out also
     
  • Suggested answer
    YUN ZHU Profile Picture
    95,307 Super User 2025 Season 2 on at
    It's indeed a bit strange. Is the environment access wrong?
    Or does more than one company not exist in that environment?
  • Community member Profile Picture
    26 on at
    Thanks Yun Zhu for your reply..
     
    I am seeing this in my company list and this is a on Prem server I feel
     
  • Suggested answer
    YUN ZHU Profile Picture
    95,307 Super User 2025 Season 2 on at
    Hi, but the company you get is not in this environment. Please reconfirm whether the environment you access in Endpoint is the same as the one you are opening now.
     
     
    Mainly the following Tenant ID and Environment Name:
     
    Hope this helps.
    Thanks.
    ZHU
  • Community member Profile Picture
    26 on at
    Hi YUN ZHU.
     
    I am getting environments like this
     
     
    And in the response I am getting name as Production 
     
    So After that I am passing like this
     
     
    and getting the same response 
     
    {
    "@odata.context": "https://api.businesscentral.dynamics.com/v2.0/623862c9-25a2-4c00-9b75-3af5811fce9a/Production/api/v2.0/$metadata#companies",
    "value": [
    {
    "id": "2887748d-9c8e-ee11-be3f-6045bde9b4bf",
    "systemVersion": "23.2.14098.14274",
    "timestamp": 4000,
    "name": "CRONUS USA, Inc.",
    "displayName": "",
    "businessProfileId": "",
    "systemCreatedAt": "2023-11-29T09:49:17.563Z",
    "systemCreatedBy": "00000000-0000-0000-0000-000000000001",
    "systemModifiedAt": "2023-11-29T09:49:17.563Z",
    "systemModifiedBy": "00000000-0000-0000-0000-000000000001"
    }
    ]
    }
     
     
  • Suggested answer
    YUN ZHU Profile Picture
    95,307 Super User 2025 Season 2 on at
    Hi, can you provide a complete screenshot of the page below? This can tell you whether your current environment is the On-Pre version, Tenant ID, Environment Name, Companies and other information.
  • Community member Profile Picture
    26 on at
    Hi YUN ZHU,
     
    I tried with businesscentral.dynamics.com URL and getting like as below
     
     
    But Original URL given by client is this https://bctest.sheldonmfg.com/
     
  • Suggested answer
    YUN ZHU Profile Picture
    95,307 Super User 2025 Season 2 on at
    Obviously, what you get in Postman is the Cloud version, so there is only one company. There is nothing wrong with this.
    However, what you need to get is the On-Pre version, which is another environment. It looks like Office 365 authentication is set up.
    In addition, the Endpoint of On-Prem is different from the Cloud version. I hope the following information can give you some tips.
     
    PS:
    How to use Postman to connect to Dynamics 365 Business Central On-Premises
    Business Central Server Administration tool is removed with Business Central 2022 release wave 2
     
     
    Thanks.
    ZHU
  • Community member Profile Picture
    26 on at
    Hi,
     
    By going to the  URL you provided I am seeing there is a different URL for On Prem. From where I can get that please and I got confirmation from client that it is On Prem server only.
     
     
     

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,377

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,696 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,512 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans