web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Copying Environments in Admin Central

(0) ShareShare
ReportReport
Posted on by 91

My company is developing application for Business Central.   We have demo environment licenses, which give us a single production environment and 3 sandbox environments.   When we copy the production environment to a sandbox, the new sandbox has a BC Tenant Id assigned to it (MSFT###########).  

Question: if a company has a license which allows them to have multiple production environments (1) can they copy production to production?  (2) if they can does this also give the new environment a different BC Tenant Id?    We have some code which needs to be executed if the BC Tenant ID changes but trying to make sure it will be unique in each environment.   

If anyone can think of a way to the BC Tenant ID will not be unique between environments I'd appreciate knowing.   Overall  this is the question:  Is the BC Tenant ID unique for each environment?   

Thanks

Duane

  • Suggested answer
    Steven Renders Profile Picture
    5,698 Moderator on at

    If it is the Azure tenant id that you mean, then it's not unique per database, it's unique per O365 tenant:

    tenant-id.png

    This means all databases, production and sandboxes, will have this same Azure tenant id. This is also the id that sometimes is visible in the BC-URL.

    Unless you mean another kind of tenant id?

    Could you specify exactly which tenant-id you are talking about?

  • Duane Moore Profile Picture
    91 on at

    The Azure tenant id is the same for all environments.  In AL code the Tenant() function returns it - all I have seen start with MSFT, followed by numbers.   What I'm trying to verify is the environment tenant is this tenant is unique in each environment.

    Side request:  the Azure Tenant ID - any suggestions on how to return this value in AL Code?

  • Duane Moore Profile Picture
    91 on at

    for the side request: Azure Tenant Id - found it.  "Azure AD Tenant" code unit which returns the value.  It's in the System Application package.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 664 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 446 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 282 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans