Where the Tenant Management disappeared in Business Central Wave 2?

From the beginning of SaaS story of NAV, when it became a Business Central we had “Tenant Management” codeunit with very useful functions


Such functions as IsSandbox(), IsProduction(), GetTenantId() i used quite a lot. 

When I tested my extension against Business Central Wave 2 I’ve got this error message


Simple investigations didn’t help. “Tenant Management” codeunit – disappeared. 


I had to recreate Wave 2 NavContainer with -includeAL tag and then get Al code source code with Create-AlProjectFolderFromBcContainer as Freddy described here.

This gave me a full copy of AL source files, where I searched for isSandbox and found it in the “Environment Information” codeunit.


Replacing “Tenant Management” to “Environment Information” solved my problem.


And the source code of Environment Information could be found here https://github.com/microsoft/ALAppExtensions/tree/master/Modules/System/Environment%20Information

Update from Rafal Babaczyk here is the list of all breaking changes https://github.com/microsoft/ALAppExtensions/blob/master/BREAKINGCHANGES.md#azure-ad-tenant-module

Share Post:

Leave a Reply

About Me


A Microsoft MVP, Business Central architect and a project manager, blogger and a speaker, husband and a twice a father. With more than 15 years in business, I went from developer to company owner. Having a great team, still love to put my hands on code and create AI powered Business Central Apps that just works.

Follow Me

Recent Posts