For app usage recording (no. of requests) and payment purposes I'd like to identify my app's users. Is the tenantid() a globally unique value for each BC tenant across all regions? If not, what is the correct way to identify a BC tenant?
As far as I know, you should use the function GetAadTenantId from Codeunit Tenant Management.
Which returns the id of the Azure Active Directory that is holding the Office 365 users.
The codeunit also has a function GetTenantId, which returns the Business Central tenant ID. I'm not sure if that one will stay forever. Maybe it changes when the BC tenant is moved to another server? The AAD Tenant ID should travel with the subscription for the whole lifetime of it, so that's the one to uniquely identify the customer.
Most helpful comment
As far as I know, you should use the function GetAadTenantId from Codeunit Tenant Management.
Which returns the id of the Azure Active Directory that is holding the Office 365 users.
The codeunit also has a function GetTenantId, which returns the Business Central tenant ID. I'm not sure if that one will stay forever. Maybe it changes when the BC tenant is moved to another server? The AAD Tenant ID should travel with the subscription for the whole lifetime of it, so that's the one to uniquely identify the customer.