Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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,
optional company as text,
optional apiRoute as text,
optional options as record
) as table
Let's say the user I authenticate with has access to different tenants and I need to specify it to access one or the other.
Cheers,
Solved! Go to Solution.
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.
Hello,
too bad you can't, but thanks for checking it out.
Regards,
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.
Hi again @v-junyant-msft ,
Could you tell me where to find all the possible "options" available for this function?
"optional options as record"
Thanks in advance.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
20 | |
20 | |
10 | |
10 | |
10 |