Edit

Application Access Management API

You can manage access to application families available in the service if you have at least the delegated Dynamics 365 Administrator role. The application family is Business Central or Embed App applications that may be provisioned through the service.

Note

This API endpoint can only be used by delegated administrators. Guest users in the customer tenant can't use this API endpoint, even if they are also a delegated administrator. Service-to-service authentication using a Microsoft Entra app authorized in the Business Central administration center isn't supported.

You can get the list of applications that are available to the customer tenant. From this list you can determine, by setting the access property, for which applications an environment may be created on the tenant.

Get List Of Manageable Applications

Returns a list of manageable applications by family and country code.

GET /admin/v2.15/manageableapplications

Response

Returns a wrapped array of applications.

{
  "value": [
    {
      "applicationFamily":  string, // The name of the family for a given Business Central offered application. (Typically this will just be "BusinessCentral") 
      "access":  boolean, // Indicates if the tenant has access to the application family/country code combination
      "countryCode": string, // The country code of the application.
    }
  ]
}

Example (PowerShell)

$url = "https://api.businesscentral.dynamics.com/admin/v2.3" 
$result = Invoke-WebRequest -Uri "$($url)/manageableapplications" -Headers @{"Authorization" = "Bearer $token"} | ConvertFrom-Json
Write-Host $($result.value | ConvertTo-Json)

Control the access to Applications

Pass the application family name in the URL and a boolean in the body.

  • True - enables the access.
  • False - disables the access.
Content-Type: application/json
PUT /admin/v2.15/manageableapplications/{applicationFamily}/countries/{countryCode}

Route Parameters

applicationFamily - The name of the family for a given Business Central offered application. (Typically this value will just be "BusinessCentral")

countryCode - Country code for the targeted application.

Body

{
  <boolean> // Desired access state
}

Note

It is not possible to disable the access to an application family for the Microsoft Entra tenant which already has an environment created in that family.

Expected Error Codes

invalidInput - the targeted property in invalid in some way

  • target: {targeted tenant's Id} - attempt to remove access to an application but the targeted tenant already has an environment in that application

resourceDoesNotExist - couldn't find the targeted application

Example (PowerShell)

$url = "https://api.businesscentral.dynamics.com/admin/v2.3" 
$country = 'DK'
$applicationFamily = 'frentals'
$access = "true"
Invoke-WebRequest -Uri "$($url)/manageableapplications/$($applicationFamily)/countries/$($country)"  -Headers @{"Authorization" = "Bearer $token"} -Body $access -Method Put -ContentType "application/json"

Application Access Management
Using Application Family