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

The Business Central Administration Center API(Copy environment)

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

The Business Central administration center API enables administrators to programmatically do administrative tasks for a Business Central tenant. With the API administrators can, for example:

  • Query and work with production and sandbox environments for the tenant.
  • Set up administrative notifications.
  • View telemetry for events on the tenant.

 Today I will talk about How we can Copy the environment by  API:

Creates a copy environment with a copy of another environment's data.

 To create copy environment you will need first

  • Setting up OAuth Authentication for Business Central Web Services / APIs

 To do that you need to register your APP on Azure Portal:

  • Open the Azure portal
  • Search for APP Registrations add new APP Registration

 pastedimage1622730441673v3.png

 pastedimage1622730519309v6.png

 pastedimage1622730519309v7.png

  • Add permissions

 pastedimage1622730497399v5.png

  • Add Client Secret

 pastedimage1622730591121v8.png

  • Save the value for the Client Secret

 pastedimage1622730611090v9.png

 

 

  • Now you will need to Get Token in Postman:

 To do that please follow the below steps:

  • From PostMan Create a new collection
  • Then select the type of Authorization to be OAUTH2.0
  • Select Edit Token configuration as below

Token-Name: Add any name you want

Grant Type: Authorization Code

Callback URL: https://businesscentral.dynamics.com/

Auth URL: https://login.windows.net/{Add your tenant id}/oauth2/authorize?resource=https://api.businesscentral.dynamics.com

Access Token URL: https://login.windows.net/{Add your tenant id}/oauth2/token?resource=https://api.businesscentral.dynamics.com

Client ID: Client ID on the App Registration

 pastedimage1622730664485v10.png

 

  • Client Secret: Client Secret Value, please check the point (e- Save the value for the Client Secret)

 pastedimage1622730697717v11.png

 

 

  • Press on Get New Access Token
  • The below screen will appear asking for login

pastedimage1622730735347v12.png

  • Then the below msg will appear

 pastedimage1622730748502v13.png

Now the Token has been generated

3-     Copy environment

To create a new environment with a copy of another environment's data.run the below request

Content-Type: application/json

Https://api.businesscentral.dynamics.com/admin/v2.6/applications/BusinessCentral/environments/Production

{

  "environmentName": "test", // The name of the new environment.

  "type": "Sandbox" // The type of environment to create. Currently only the value "Sandbox" is supported. 

}

 

 pastedimage1622730777386v14.png

 pastedimage1622730791150v15.png

The Reference

 

https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/administration-center-api#copy-environment

 the PDF file:

[View:/cfs-file/__key/communityserver-discussions-components-files/758/5383.The-Business-Central-Administration-Center-API_2800_Copy-environment_2900_.pdf]

Thank you,

  • Suggested answer
    Marco Mels Profile Picture
    Microsoft Employee on at

    Thank you for sharing Islam!

  • Jops Profile Picture
    10 on at

    this is amazing! you're a lifesaver! thanks!

  • Bilal Haider Profile Picture
    487 on at

    Hi Islam Bakr,

    Thanks for sharing. Can you upload images again. It is very hard to read from them.

  • Microsoft Dynamics 365 Business Central Profile Picture
    Microsoft Employee on at

    Hi Bilal,

    I added a PDF in the Original post so please check it and let me know if you need anything else?

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

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 757 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 451 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 391 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans