Notifications
Announcements
Hi Experts,
How we will find that the working instance is Production or Sandbox using javascipt code? I want to get value of Instance Type(Production / Sandbox) So that I would display on my custom form.
Hi partner,
Unfortunately we could not get the instance type from javascript code.
We could get it by Online Management Api with C#.
We could use "{ServiceUrl}/api/v1.2/Instance/{id}" to get a instance's details. The instance id could be found in Settings->Customizations->Developer Resource.
And this doc provided a sample about how to get the instances by C#, but I tried the sample code and the feature "AuthenticationParameters.CreateFromResourceUrlAsync" it used is now obsolete so that we should find another way instead to test. Microsoft haven't update the code yet :-(
You could also refer to the following docs.
https://docs.microsoft.com/en-us/rest/api/admin.services.crm.dynamics.com/instances
https://docs.microsoft.com/en-us/rest/api/admin.services.crm.dynamics.com/instances/getinstance
https://docs.microsoft.com/en-us/rest/api/admin.services.crm.dynamics.com/instances/getinstances
Hope it helps.
Best Regards,
Leo
Hi Leo,
Thanks for response
As I hit that url in my browser
admin.services.crm.dynamics.com/.../
It gave me error of access denied as mention below:
Access to admin.services.crm.dynamics.com was deniedYou don't have authorization to view this page.
My region is North America
I have both Global administrator and system administrator permission.
Can you know Why this happen?
What type of additional permission we need?
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 104 Super User 2025 Season 2
TAHER_El_Mehdi 30
MikeC - RAMCO 21