Forum Discussion

Payeras_BI's avatar
Payeras_BI
Solution Sage
2 years ago
Solved

Help with "Dynamics365BusinessCentral.ApiContentsWithOptions"

Hello, Does anyone know if it is possible to specify the Business Central tenant in the following PQ function? Dynamics365BusinessCentral.ApiContentsWithOptions( optional environment as text, ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Payeras_BI ,

    After a documentation search and testing, the Dynamics365BusinessCentral.ApiContentsWithOptions function does not currently directly support specifying tenants as part of its parameters. The tenant context is typically determined by the authentication token used in the connection, which is associated with the user's credentials and the tenants they can access.
    Maybe if you have control over the Business Central environment, you could potentially create a custom API that allows specifying the tenant as part of the API call. This custom API would then handle the tenant-specific logic on the Business Central side.

    Best Regards,
    Dino Tao
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.