Forum Discussion
CompanyID is not returning from Business central for BC API Companies
- Anonymous1 year ago
Thanks, am able to get the CompanyID information from Postman and even with Spark notebooks also, not sure why pipelines is not returning the CompanyID.
I implemented the Bearer token authentication approach in notebook and loading the data to fabric lakehouse in config table from there am referencing it for my needs.
Hi Anonymous,
Thanks for reaching MS FAbric commmunity support.
Possible Causes:
API Version Difference: The expected API response in the Microsoft documentation includes "id", but your actual response does not. Ensure you're using the latest Business Central API version (v2.0 or higher).
Incorrect API Endpoint: Double-check the API endpoint you are using. It should be:
https://api.businesscentral.dynamics.com/v2.0/{tenantId}/production/api/v2.0/companies
Ensure you have replaced {tenantId} with your actual tenant ID.
Missing Permissions in Azure AD App Registration: Your Azure AD app may not have the necessary permissions.
Ensure the app has Financials.ReadWrite.All or Financials.Read.All permissions in Azure AD.
API Query Parameters: Try adding $select=id,name to your request:
This ensures only relevant fields (id, name) are retrieved.
Thanks,
Prashanth Are
MS Fabric community support