Convert Users & Permission from NAV to Business Central

If you migrate from Dynamics NAV On-Prem to Business Central Cloud you’ll learn that assigning and migrating users is a little bit different than it used to be.

You’ll have to assign users from your Office 365 environment and then assign permissions in Business Central.

What if you have 180 users and you had spent a lot of time in NAV to create roles that are approved and compliant.

You can create the Permission Sets with PowerShell if you upgrade via version 18, but if you migrate using the cloud migration tool from the BC14 version this does not exist.

Also, you’ll find out that objects no longer exist in Business Central, the Azure Active Directory might have a different name or for whatever reason you want more control over the process.

To overcome this problem, and to make the process easier to manage I have created a tool in both C/Side and AL that may help you too.

The tool can be found on my GitHub page.

Step 1 – Convert Permission Sets to AL Objects

The first step is to convert the existing Permission Sets to AL objects and put them in an extension of their own.

NOTE: This extension needs to have a dependency on you ISV Apps if your security uses these objects too.

This process is done in Codeunit Export Permissions to AL that you need to run from C/Side. The Codeunit will create a ZIP file that contains the AL files.

Open the ZIP file and copy the objects to your AL project.

Compile and publish the project to your Business Central Tenant.

Step 2 – Export Users and Assigned Permission Sets

The second step is to run Codeunit Export Users & Permission Sets.

This will create an old fashioned CSV file with user names and roles.

I’ve used user names because the Azure Active Directory users may be different from the On Prem Windows Active Directory

Step 3 – Read Users and Permissions into Business Central

For this step you need to build the AL extension in the GitHub repo and publish it to your tenant.

This will create two tables to store the contents of the CSV file in.

Once the extension is loaded, search for the page “Dynamics NAV Users” and find the import action. Execute this action and import the CSV file

Step 4 – Assign the Permissions to the Users

This last step is not automated, you may want to do that, but for now, you can open a user card and see which permission sets made it to the other end. Not all permission sets may be exported because the tool will skip sets with obsolete objects or sets with only “0” ID permission sets

Step 5 – Enjoy the result!

Your users’ permissions have been converted. You may need to add objects that did not exist in NAV but were added to Business Central and test if everything works.

Advertisement

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.