Share This Post

D365 Business Central Sandboxes and Entitlements

The experience that a user has in Dynamics 365 Business Central depends on the purchased subscription plan. In D365 Business Central Sandboxes and Entitlements, there are two main plans; the Essential and the Premium plan, plus a few more.

When you develop in a Docker sandbox, the Essential experience is automatically assigned to you (you set the experience on the Company Information page), which makes it difficult to test how a user with the Premium plan assigned will experience what you have developed.

D365 Business Central Sandboxes and Entitlements Overview

1. Setup for Users with Different Plans

When you assign user groups the permissions in that user group are automatically assigned. Some user groups are not assigned by default, but the plan includes them.

In the D365 Business Central Sandboxes and Entitlements table below non-default means not assigned by default, but the plan allows this to be assigned to the user.

To mimic users with a specific subscription plan assigned, you can set them up with the user groups as detailed in the table below.

User Name
The type of subscription plan
assigned to the given user
User Groups Permission Sets
EXTERNALACCOUNTANT D365 EXT. ACCOUNTANT
Dynamics 365 EXTENSION MGT
D365 TROUBLESHOOT (non-default)
D365 SECURITY (non-default)
Dynamics 365 BUS FULL ACCESS
Dynamics 365 EXTENSION MGT
D365 READ
LOCAL
TROUBLESHOOT TOOLS (non-default)
Dynamics 365 BASIC (non-default)
SECURITY (non-default)
PREMIUM D365 BUS PREMIUM
Dynamics 365 EXTENSION MGT
D365 TROUBLESHOOT (non-default)
D365 SECURITY (non-default)
Dynamics 365 BUS PREMIUM
D365 EXTENSION MGT
LOCAL
TROUBLESHOOT TOOLS (non-default)
Dynamics 365 BASIC (non-default)
SECURITY (non-default)
ESSENTIAL D365 BUS FULL ACCESS
Dynamics 365 EXTENSION MGT
D365 TROUBLESHOOT (non-default)
D365 SECURITY (non-default)
Dynamics 365 BUS FULL ACCESS
D365 EXTENSION MGT
LOCAL
TROUBLESHOOT TOOLS (non-default)
MS Dynamics 365 BASIC (non-default)
SECURITY (non-default)
INTERNALADMIN D365 INTERNAL ADMIN
D365 TROUBLESHOOT
Dynamics 365 SECURITY (non-default)
MS Dynamics 365 READ
LOCAL
SECURITY
TROUBLESHOOT TOOLS
Dynamics 365 BASIC (non-default)
SECURITY (non-default)
TEAMMEMBER D365 TEAM MEMBER
D365 TROUBLESHOOT (non-default)
Dynamics 365 SECURITY (non-default)
D365 READ
D365 TEAM MEMBER
LOCAL
TROUBLESHOOT TOOLS (non-default)
D365 BASIC (non-default)
SECURITY (non-default)
DELEGATEDADMIN D365 EXTENSION MGT
Dynamics 365 FULL ACCESS
D365 RAPIDSTART
D365 TROUBLESHOOT
Dynamics 365 SECURITY (non-default)
Dynamics 365 BASIC
D365 EXTENSION MGT
Dynamics 365 FULL ACCESS
D365 RAPIDSTART
LOCAL
TROUBLESHOOT TOOLS
Dynamics 365 BASIC (non-default)
SECURITY (non-default)

2. Assigning the Premium Plan to Test Users

Depending on how you are running your Docker sandbox, you assign the experience in different ways.

Azure VMs

If you use http://aka.ms/bcsandbox to create your Dynamics 365 Business Central Sandbox Container Azure VM, the Azure Resource Manager template has two fields; Assign Premium Plan and Create Test Users, which by default are set to Yes.

Assign Premium Plan specifies whether or not your admin user should be assigned a Premium plan. Create Test Users specifies whether or not you want the setup to include test users.

If you are using New-NavContainer to create your Microsoft Dynamics 365 Business Central Sandbox container, you must make sure that you are using version 0.2.8.3 or later.

Use the switch assignPremiumPlan on New-NavContainer like this:

New-NavContainer -accept_eula -assignPremiumPlan -containerName test -imageName microsoft/bcsandbox

This D365 Business Central Sandboxes and Entitlements assigns the Premium plan to your default admin user. Internally this just adds a record to the User Plan table.

To create the test users, you must call the Setup-NavContainerTestUsers method:

Setup-NavContainerTestUsers containerName test -tenant default -password $securePassword

Specify the container and the password that you want to use for the new users.

Internally, the Setup-NavContainerTestUsers downloads an app which exposes an API, publishes and installs the app, and then invokes the CreateTestUsers API with the password needed. After this, the app is uninstalled and unpublished.

Docker Run

If you are using Docker run to run your containers, you have a little more work to do.

First of all, you must override the SetupNavUsers.ps1 by sharing a local folder to c:\run\my in the container and place a file called SetupNavUsers.ps1 in that folder with the following content:

# Invoke default behavior
. (Join-Path $runPath $MyInvocation.MyCommand.Name)

Get-NavServerUser -serverInstance NAV -tenant default |? LicenseType -eq “FullUser” | % {
$UserId = $_.UserSecurityId
Write-Host “Assign Premium plan for $($_.Username)”
sqlcmd -S ‘localhostSQLEXPRESS’ -d $DatabaseName -Q “INSERT INTO [dbo].[User Plan] ([Plan ID],[User Security ID]) VALUES (‘{8e9002c0-a1d8-4465-b952-817d2948e6e2}’,’$userId’)” | Out-Null
}

This will allocate the Premium plan to the admin user in the database. To set up test users, you can clone the createtestusers repository and modify the code to create the users on the oninstall trigger with the password that you want. For more information on D365 Business Central Sandboxes and Entitlements, please contact us.

Share This Post

Leave a Reply

avatar
  Subscribe  
Notify of
Skip to toolbar