Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Call the API to get a list of environments

(1) ShareShare
ReportReport
Posted on by 8
Hello. I'm a web developer working on Dynamics 365 Business Central integration.
I have registered a Microsoft Entra application and set up the Microsoft Entra application in Business Central according to this documentation

I received an access token and tested it with a request to the endpoint of the list of companies for the production environment. The request was completed successfully and I received a list of companies.
But when I use the same token to request a list of available environments, I get a 401 response code. To request a list of environments, I use the following endpoint specified in the documentation
GET https:/api.businesscentral.dynamics.com/environments/v1.1
 
I assume that the error is related to the API versions. I have the token for version v2.0. And in the endpoint of the environment list, version 1.1 is indicated.
Could you please tell me if it is possible to get a list of environments for version v2.0 through a request to the API? maybe I'm doing something wrong?
  • Oleh Antykuz Profile Picture
    Oleh Antykuz 8 on at
    Call the API to get a list of environments
    Unfortunately I'm still getting a 401 response code. Even using the admin center API URL that you mentioned. I am attaching screenshots of the application settings and requests in postman. Please tell me what I missed?
     
      
     
     
     
     
     
    Thanks
     
  • Oleh Antykuz Profile Picture
    Oleh Antykuz 8 on at
    Call the API to get a list of environments
    Thanks for the links to the documentation and URL
    It looks like I need an additional permission for the application "AdminCenter.ReadWrite.All" which was not previously delegated to the application. I'll test this after the Azure portal admin approves this permission and let you know
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 78,032 Super User 2025 Season 1 on at
  • Suggested answer
    gdrenteria Profile Picture
    gdrenteria 14,573 Most Valuable Professional on at

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans