find Azure tenant ID from Business central code

Hi All,

I want find azure tenant ID from Busness central code. Please suggest how to find tenant ID.

businesscentral.dynamics.com/[TENANT_ID]/admin

Thanks

Hello,

check this out : https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/database/database-tenantid-method
ID := Database.TenantId()

best regards,

Thomas Barbut