How can partners add permission sets?


Microsoft partners who build solutions based on Business Central need a way to expose access to their custom objects through so-called System permission sets. These permission sets are read-only, but users can copy them to create User-Defined permission sets with different permissions. All permission sets released by Microsoft are also of type System.

Note that permissions sets imported as XML or through RapidStart will create User-Defined permission sets, which are then editable.

The following describes how to add custom permission sets of type System in both the on-prem and the SaaS versions of the product.

Let’s assume that the Microsoft partner has the following simplified set of objects in their solution.

The following image shows the custom permission set that contains the related permissions.

On prem

To add custom permissions sets on prem, the Microsoft partner must bundle the new set with the existing System permission sets.

Before adding the solution to the Business Central product, the Microsoft partner must run C/AL code to create the related System permission sets. The code performs three changes:

  1. Creates the permission set directly in the Permission Set table
  2. Creates the permissions for the involved objects for the above permission set in the Permission table
  3. Creates a hash of the permission set which is then used to establish the link between the original permission set and any copies created by users.

The following image shows the result of running the code: The custom permission set is added to the list of System permission sets.

The following sample objects reflect the above scenario of adding a System permission set for the involved objects.

COD50001 TAB50001 PAG50001

SaaS

On SaaS, Microsoft partners create solutions as Business Central extensions. Extensions cannot change the System permission sets that have been released by Microsoft. Microsoft partners can, however, create permission sets of type Extension which behave the same way as a System permission set in terms of editability by the user.

Related reading

Exporting data for Extensions in Business Central developer help

Managing Users and Permissions in Business Central application help

Comments (0)

Skip to main content