• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
  • Business Central
  • Dynamics NAV
    • NAV 2018
    • NAV 2017
    • NAV 2016
    • NAV 2013
  • Others
    • About
    • Privacy Policy
    • Disclaimer
    • Contact Us

Navision Planet

This Blog is intended to help Microsoft Dynamics NAV / Business Central ERP developers as well as users. If you just go through these blogs you will understand what I have told is correct. The Blog will continuously get update with latest news. This Blog is handled by a group of Microsoft Certified Partners as well as Business Solution Specialists in Microsoft Dynamics NAV and Dynamics 365 Business Central. Feel free to mail us for any doubts.

  • LS Retail
  • Help Topics
    • Finance Module
    • Manufacturing Module
    • Warehouse Module
    • Administration
  • Navision Developer
  • GST
  • D365 Business Central
  • CU Update
    • Download Business Central

You do not have access to Microsoft Dynamics NAV or D 365 Business Central Error

Table of Contents

  • You do not have access to Microsoft Dynamics NAV or D 365 Business Central Error
    • Add User to D 365 Business Central / Microsoft Dynamics NAV 2018 Database or Lower
      • NAV Error Message
  • Route Cause
  • Resolution
    • 1) Open Windows PowerShell ISE
    • 2) Import the Module to activate Dynamics NAV commands
      • Dynamics 365 Business Central
      • Dynamics NAV 2013
      • Dynamics NAV 2013 R2
      • Dynamics NAV 2015  
      • Dynamics NAV 2016
      • Dynamics NAV 2017
    • 3) Refresh Commands
    • 4) Create New User ID via Power shell
    • 5) Assign new Permissions to newly created User ID

You do not have access to Microsoft Dynamics NAV or D 365 Business Central Error

Add User to D 365 Business Central / Microsoft Dynamics NAV 2018 Database or Lower

NAV Error Message

Are you getting following error on Dynamics NAV 

 “You do not have access to Microsoft Dynamics NAV. Verify that you have been setup as a Valid user in Dynamics NAV”

You do not have access to Microsoft Dynamics NAV. Verify that you have been setup as a Valid user in Dynamics NAV / Business Central
You do not have access to Microsoft Dynamics NAV. Verify that you have been setup as a Valid user in Dynamics NAV / Business Central

This error may arrived on any of the following NAV versions  

  • Microsoft Dynamics NAV 2013 (7.0)
  • Microsoft Dynamics NAV 2013 R2 (7.1)
  • Microsoft Dynamics NAV 2015 (8.0)
  • Microsoft Dynamics NAV 2016 (9.0)
  • Microsoft Dynamics NAV 2017 (10.0)
  • Microsoft Dynamics NAV 2018 (11.0)
  • Microsoft Dynamics 365 Business Central

Route Cause

You have restored database on a server where the actual list available on the Dynamics NAV not exist.

For example, You have taken the DB backup from a Live Server where following User IDs exist. 

  • User ID 1 or Domain / User ID 1
  • User ID 2 or Domain / User ID 2

But the on the restoring server domain login not equal to both.

  • On Test Server  / Restored server exist only User ID 3 or Domain / User ID 3

Resolution

Most of the times when you have tried to add the user in the SQL then also issue not resolved. This is due to failure of one of the following required security requirement.  

  • SQL Server not user to DB restored
  • Dynamics NAV not having windows login of login-ed system.

For resetting the User Related tables data use the following method to delete the same via SQL (Easiest Method)

For opening the SQL Server – Type “ssms” in run command and open SQL server management studio.

SQL Query

USE [Your New Database Name]
GO
delete from [dbo].[User]
delete from [dbo].[Access Control]
delete from [dbo].[User Property]
delete from [dbo].[Page Data Personalization]
delete from [dbo].[User Default Style Sheet]
delete from [dbo].[User Metadata]
delete from [dbo].[User Personalization]

Where Your New Database Name should replace with your database name. If your database name is “Demo Database NAV (7-1)” then use following code on first line

USE [Demo Database NAV (7-1)]

Then press Ctrl + N open the SQL Query page and paste the above code and Execute.

Caution: Once you execute this all user related records will delete. You have recreate the same
Once you have done this please process following steps as well.

Please try to reopen the Dynamics NAV. 

Some times still issue will not resolve then please follow below steps as well.

Solution Summary as follows. 

You will get the permanent solution in following 4 Steps

  1. Open Windows PowerShell ISE
  2. Import the Module to activate Dynamics NAV commands
  3. Refresh Commands
  4. Create New User ID via Power shell
  5. Assign new Permissions to newly created User ID

1) Open Windows PowerShell ISE

To open the Windows PowerShell ISE , you have to type ISE or Windows PowerShell ISE search.

Once you do then will get following screen (left).

Windows PowerShell ISE
Windows PowerShell ISE

Make sure that you have opening the Windows Power Shell in “Run as Administrator” option to get better result.

Once you open the Windows power shell need make sure right side like windows selected on Windows Power Shell on View menu (This is to make sure all the necessary windows are enabled for view and better understanding only)

Once you complete this first step is over.  

2) Import the Module to activate Dynamics NAV commands

Next step is to Import the NAV cmdlet command via Windows Power Shell

Windows Power Shell ISE screen after NAV Module Import
Windows Power Shell ISE screen after NAV Module Import

Note below Query is for the Dynamics NAV 2018 version. If you want to perform the same for other versions the please copy corresponding version queries.

Set-ExecutionPolicy unrestricted -Force
Import-Module 'C:\Program Files\Microsoft Dynamics NAV\110\Service\NavAdminTool.ps1'

For entering the command you have paste the given the command on white space available on the above screen. 

Once you enter the command just press F5 to execute or as mentioned in the image click on to the green symbol with right arrow.  

Dynamics 365 Business Central

Following script needs to be add when you are using Business Central database with version after April 2019 (14).

April 2022 Wave 1 Version

Set-ExecutionPolicy unrestricted -Force
Import-Module 'C:\Program Files\Microsoft Dynamics 365 Business Central\200\Service\NavAdminTool.ps1'

April 2021 Wave 2 Version

Set-ExecutionPolicy unrestricted -Force
Import-Module 'C:\Program Files\Microsoft Dynamics 365 Business Central\190\Service\NavAdminTool.ps1'

April 2021 Wave 1 Version

Set-ExecutionPolicy unrestricted -Force
Import-Module 'C:\Program Files\Microsoft Dynamics 365 Business Central\180\Service\NavAdminTool.ps1'

April 2020 Wave 2 Version

Set-ExecutionPolicy unrestricted -Force
Import-Module 'C:\Program Files\Microsoft Dynamics 365 Business Central\170\Service\NavAdminTool.ps1'

April 2020 Wave 1 Version

Set-ExecutionPolicy unrestricted -Force
Import-Module 'C:\Program Files\Microsoft Dynamics 365 Business Central\160\Service\NavAdminTool.ps1'

October 2019 Version

Set-ExecutionPolicy unrestricted -Force
Import-Module 'C:\Program Files\Microsoft Dynamics 365 Business Central\140\Service\NavAdminTool.ps1'

April 2019 (14)

Set-ExecutionPolicy unrestricted -Force
Import-Module 'C:\Program Files\Microsoft Dynamics 365 Business Central\140\Service\NavAdminTool.ps1'

Dynamics NAV 2013

Set-ExecutionPolicy unrestricted -Force
Import-Module 'C:\Program Files\Microsoft Dynamics NAV\70\Service\NavAdminTool.ps1'

Dynamics NAV 2013 R2

Set-ExecutionPolicy unrestricted -Force
Import-Module 'C:\Program Files\Microsoft Dynamics NAV\71\Service\NavAdminTool.ps1'

Dynamics NAV 2015  

Set-ExecutionPolicy unrestricted -Force
Import-Module 'C:\Program Files\Microsoft Dynamics NAV\80\Service\NavAdminTool.ps1'

Dynamics NAV 2016

Set-ExecutionPolicy unrestricted -Force
Import-Module 'C:\Program Files\Microsoft Dynamics NAV\90\Service\NavAdminTool.ps1'

Dynamics NAV 2017

Set-ExecutionPolicy unrestricted -Force
Import-Module 'C:\Program Files\Microsoft Dynamics NAV\100\Service\NavAdminTool.ps1'

Note: given path may different depending upon the NAV installation location

Once you execute the command system will automatically import all the necessary commands details for corresponding NAV version. So its important to import the same version module to achieve the desired the results.  

3) Refresh Commands

Refresh commands is the 3rd step. For doing this you have to press Refresh on  right side Commands column available on the Windows Power Shell screen.

Once you refreshed system will populate the Dynamics NAV commands for the imported version.

FYI specifying the important commands available with the Windows Power Shell option

  • 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.

4) Create New User ID via Power shell

You can create new NAV user ID via power shell commands by following steps  

Select New-NAVServerUser command and perform the steps given like following screen shot

New User ID creation NAV 2017
New User ID creation NAV 2017
  • Enter the “New-NAVServerUser” on Name option
  • Once found on the line choose the “New-NAVServerUser“
  • Above image like screen will populate after selection of “New-NAVServerUser”
  • Fill the ServerInstance of service where new ID need to create
  • Fill the Windows Account, Enter the Domain ID / User Name format (If you don’t have any domain then enter the User Name directly)
  • Press Run button at the bottom to finalize this

5) Assign new Permissions to newly created User ID

To assign proper permission set to the newly created user then need to follow steps below

NAV Permission Set Assign Steps
NAV Permission Set Assign Steps
  • Enter the “NAVServerUserPermissionSet” on Name option
  • Once found on the line choose the “New-NAVServerUserPermissionSet“
  • Above image like screen will populate after selection of “New-NAVServerUserPermissionSet”
  • Fill the ServerInstance of service where new ID need to create
  • Fill the Windows Account, Enter the Domain ID / User Name format (If you don’t have any domain then enter the User Name directly)
  • Press Run button at the bottom to finalize this

Well done!!

All the steps are over. Now try to re-open the NAV via client. 

Reader Interactions

Comments

  1. Natalia says

    September 18, 2020 at 8:14 am

    Thank you so much for this post! It saved my life.

    Reply
    • JUBEL THOMAS says

      September 19, 2020 at 3:41 am

      You are well come Natalia.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Subscribe

  • Email
  • Facebook
  • Twitter

Our Topics

Administration Analysis Reports Business Central Developer Toolkit Docker Dynamics NAV Beta Download Dynamics NAV Release Error Message Finance Module GST Human Resource Login Error LS Retail LS Retail 2013 Manufacturing Module Microsoft Certified Trainers (MCTs) Microsoft Dynamics Business Central Microsoft Dynamics NAV 2009 Microsoft Dynamics NAV 2013 Microsoft Dynamics NAV 2015 Microsoft Dynamics NAV 2017 Microsoft Dynamics NAV 2018 MSDyn365BC NAV 2016 Navision Certification Navision Developer Navision Introduction Navision Modules Navision Retail Navision Tips And Tricks Powershell Purchase Order Sales Module SQL Server Useful Sites Visual Studio Code Warehouse Module

Footer

Recent Post

  • Dynamics NAV Versions List
  • Business Central Complete Version List and Direct Download
  • Learn NAV Programing Language

Search

Contact : support@navisionplanet.com for Microsoft Dynamics NAV (Navision ) and LS Retail Development or Functional support for any modules

 

Editors News Letter


New Microsoft Dynamics NAV Technical Blog opened the Navision Planet Team

MIBUTECH

https://www.mibutech.blogspot.com

Copyright © 2023 Navision Planet