Al: How to publish an Extension App to a Customer Sandbox via Visual Studio Code

Created on 9 Oct 2018  路  6Comments  路  Source: microsoft/AL

Hello

Could anyone tell me if it is possible to connect to a sandbox environment of business Central of a client via Visual Studio Code?

If so could anyone describe how / where we can specify we want to deploy our extension to that specific Cloud Sandbox environment?

Thanks

question

Most helpful comment

Yes, the tenant parameter _can_ be set to tenant ID, that you see in the Business Central URL, as @salgiza mentioned.

It could also be set to a domain name, for example: mycompany.onmicrosoft.com, which is a bit easier to memorize.

So for example, if the customer login in BC is [email protected], then usually everything after the @ sign can be used as a tenant.

Please also note that a single Active Directory tenant may have multiple associated domains, so for example fourcoffee.com and fourcoffee.onmicrosoft.com could identify the same company, but you should be able to use any of those domains in the tenant parameter in launch.json.

By the way, business central URLs work in the same manner, so the following two URLs are equivalent:

All 6 comments

I have the same problem, I can connect to their production tenant / sandbox via https://partner.microsoft.com/commerce/customers/ but I can't seem to find a way to publish or debug via VSCode.

I haven't tried it myself, but you should be able to connect to a particular customer sandbox by specifying their tenant Azure AD domain in the "tenant" parameter of the launch.json.

Your O365 user should be a delegate admin in the customer AD, though (you should already be able to access their Sandbox through the web browser):
https://support.office.com/en-us/article/partners-offer-delegated-administration-26530dc0-ebba-415b-86b1-b55bc06b073e

I'm pretty sure I'm a delegate admin for this particular customer and am able to access their sandbox via the browser.
Do you happen to know where I can find the "Tenant Azure AD domain" value or how to obtain it?

Do you have an example of how this parameter might look like?

If I'm not mistaken, it is the GUID you will see in the URL when you open the customer's sandbox from https://partner.microsoft.com/commerce/customers/

If you open the default sandbox URL ( https://businesscentral.dynamics.com/Sandbox ) you'll go to your company's sandbox.

If you open your customer's sandbox, though, you'll see that the URL contains a GUID between the businesscentral.dynamics.com domain and the sandbox part. Something like:

https://businesscentral.dynamics.com/1938df7b-4e10-44f1-ca68-09269279873b/Sandbox.

That ID in the middle is the AAD Tenant ID.

If you are curious, you can also get that value by calling the GetAadTenantId() method, in codeunit "Tenant Management".

Yes, the tenant parameter _can_ be set to tenant ID, that you see in the Business Central URL, as @salgiza mentioned.

It could also be set to a domain name, for example: mycompany.onmicrosoft.com, which is a bit easier to memorize.

So for example, if the customer login in BC is [email protected], then usually everything after the @ sign can be used as a tenant.

Please also note that a single Active Directory tenant may have multiple associated domains, so for example fourcoffee.com and fourcoffee.onmicrosoft.com could identify the same company, but you should be able to use any of those domains in the tenant parameter in launch.json.

By the way, business central URLs work in the same manner, so the following two URLs are equivalent:

thank you salgiza and dennisfrostlander that did the trick :)

Was this page helpful?
0 / 5 - 0 ratings