Skip to main content

Add User to Microsoft Dynamics NAV 2016 Database.

Hi All,

As New Version Release there are some changes in System Tables and the way how we resolve our issues that we found solution in Previous Versions.

With Release of Microsoft Dynamics NAV 2016, our famous issue Get Access to Database Need to be resolved.

If You Don't know the issue, here is a simple details -

You Receive a Database From Customer or you have a database on your server but you are not part of the Users in the database. When you try to access the Client (Windows / Web / Tablet / Phone) System generates Below Error Message.

You do not have access to Microsoft Dynamics NAV. Verify that you have been set up as a valid user in Microsoft Dynamics NAV.

IN Nav 2013, if you remember we discussed Two Ways to get access to the database - 

 > Delete All Users  (Can be Used with NAV 2016)

 > Add Your User From SQL (Will not work with NAV 2016)

But with Release of NAV 2013 R2 and Later, the Great Power Came with Powershell.
In This article we will see how we can use powershell cmdlet to Add Our User with Certain Permission in the database.

** Article Applies to NAV 2013 R2 and Later.

How to Open PowerShell, refer Here !!
1. Open Powershell as Administrator.

2. Import Navision Cmdlet, if you are using the ISE (I love to use this).

  •    import-module "C:\Program Files\Microsoft Dynamics NAV\90\Service\NavAdminTool.ps1"

   ** Change 90 TO 80 or 71 for NAV 2015 or NAV 2013 R2 respectively.

3. Refresh the commands Panel and search for NAVServerUser, The result will be something like Shown Below..

4. Let's discuss in Brief about Search Results first -

Get-NavServerUser - Returns information about all users created in the current Microsoft Dynamics NAV database.
Get-NAVServerUserPermissionSet - Returns permission set information for Microsoft Dynamics NAV users.

New-NAVServerUser - Creates a new Microsoft Dynamics NAV user.
New-NAVServerUserPermissionSet - Assigns a permission set to a Microsoft Dynamics NAV user.

Remove-NAVServerUser - Deletes a Microsoft Dynamics NAV user.
Remove-NAVServerUserPermissionSet - Removes a permission set from the list of permission sets that are assigned to a Microsoft Dynamics NAV user.

 Set-NAVServerUser - Changes the configuration settings of an existing Microsoft Dynamics NAV user.

5. For the Purpose of this Article, we need to use only New-NavServerUser and New-NAVServerUserPermissionSet.
For others you can just select and specify the mandatory parameter to see how it works.

6. Select New-NAVServerUser and Specify the Required Parameter as shown below -

7. Now User is created, we need to assign Permission to user, select New-Select NAVServerUserPermissionSet and specify the required Parameter as shown Below -

All Done and we should be able to login to database now...

In This Article we used two cmdlet as below -

#Add User - 
New-NAVServerUser -ServerInstance <<Service Name>> -WindowsAccount <<Domain\USerName>> -LicenseType Full -State Enabled

#Add User Permission - 
New-NAVServerUserPermissionSet -PermissionSetId SUPER -ServerInstance <<Service Name>> -WindowsAccount "Domain\USerName"

Hope you find the information useful. Let me know your feedback as comment to article.

Saurav Dhyani


Post a Comment

Popular posts from this blog

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing - 

Microsoft Dynamics NAV 2016 - How to Configure Phone Client.

Hi All, In this article we will discuss how we can connect Microsoft Dynamics NAV 2016 with New Client Launched i.e. Phone Client. This Article Contain Steps for a Android Phone as I have Only Android Phone. I am doing it having all tiers on my windows 8 machine, steps remain same for multiple servers but issues might be different. What we Need (Other what we discuss in this article) -  The Service Tier should be on Public IP . Some of the Data-card does not Provide you Public IP. check it for sure.

Download Microsoft Dynamics Business Central on Premises 2020 Wave 2 Release.

 Hi Readers, As Expected Microsoft have released #msdyn365bc 2020 wave 2 is available.  This article provides details of the new release. The 2020 release wave 2 for Business Central delivers a wealth of new features. Read What's new in 2020 Release Wave 2 here .  Dynamics NAV Customers upgrading to Business Central on Prem will be able to run business central on premises, move to cloud or choose a hybrid approach.