Microsoft 365 ListCompanies

Microsoft 365 ListCompanies

Certified

List Business Central companies

Retrieves all companies available in the Business Central environment. Requires the Financials.ReadWrite.All API permission on the service principal.

yaml
type: io.kestra.plugin.microsoft365.dynamics365.businesscentral.ListCompanies

List all Business Central companies

yaml
id: bc_list_companies
namespace: company.team

tasks:
  - id: list
    type: io.kestra.plugin.microsoft365.dynamics365.businesscentral.ListCompanies
    tenantId: "{{ secret('AZURE_TENANT_ID') }}"
    clientId: "{{ secret('AZURE_CLIENT_ID') }}"
    clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
    environment: production
Properties

Client ID

Client ID of the Azure service principal. If you don't have a service principal, refer to create a service principal with Azure CLI.

Business Central Environment Name

Name of the Business Central environment to target, e.g. production or sandbox. This is combined with the tenant ID to form the base URL: https://api.businesscentral.dynamics.com/v2.0/{tenantId}/{environment}/api/v2.0.

Tenant ID

Azure AD (Entra ID) tenant GUID used for authentication.

Business Central API endpoint

Override the Business Central API base URL. Useful for sovereign clouds (e.g. GovCloud, China). Defaults to https://api.businesscentral.dynamics.com when not set.

Client Secret

Service principal client secret. Use this for Client Secret authentication. Provide clientId, tenantId, and clientSecret. Either clientSecret OR pemCertificate must be provided, not both.

PEM Certificate

Alternative authentication method using certificate-based authentication. Use this for Client Certificate authentication. Provide clientId, tenantId, and pemCertificate. Either clientSecret OR pemCertificate must be provided, not both.

Reference (ref) of the pluginDefaults to apply to this task.

SubTypeobject

Companies

List of company objects returned by Business Central.

Total number of companies

Count of companies returned.

Unitcompanies

Number of companies returned