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.

Regards,
Saurav Dhyani

Comments

  1. Mega Tip!
    Thank you very much Saurav.
    Best Regards,

    ReplyDelete

Post a Comment

Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

RTC Report It is not possible to instantiate the Visual Studio bridge.

Hi all, As a Navision developers I have Multiple Versions of Navision running in single Machine. As discussed Earlier in the post how to run multiple Version of RTC in single machine. So my machine have following details for RTC Versions - NAV 2009 R2    - is installed. NAV 2009 SP1  - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 SP1 IN\ NAV 2009         - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 IN\ This approach has been working great for execution of Classic and RTC Clients. However, after installing Dynamics NAV 2009 R2, if i tried to view the Layout for an NAV 2009 SP1 Report i was getting the following error: ---------------------------  Microsoft Dynamics NAV Classic  ---------------------------  It is not possible to instantiate  the Visual Studio bridge.  ---------------------------  OK    --------------------------- After searching for the error i figured out the issue was due to - Design change in NA

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.