web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Setting Up Administrator Account in NAV when Administrator accidentally deletes his own permission

Olister Rumao Profile Picture Olister Rumao 3,967

Introduction:

Today, I received a call from one of the NAV Administrators stating the issue as if I try to access the User Card page for some users I receive the following error.



Upon investigating it was clear that the Administrator by mistake deleted his own access to the company for all the users who have access to a different company.

Even using the Administrators account I cannot get access to a different company.
The condition here was that I cannot simply clear all User Access as per the blog below.
https://www.sauravdhyani.com/2012/12/you-are-not-authorized-to-sign-in.html

Pre-requisites

Microsoft Dynamics NAV / Business Central On-Premise

Demonstration:

1. Modifying User using SQL Database:
If observed it evident that whenever the Administrator account is added there should always be a Windows User associated with it.

To remove this constraint, modify the Username in User Table and Windows Security ID using SSMS in SQL Tables.

Changed the User Name to ADMINISTRATOR-1 and one character in User Security ID 

At this point, I wasn't sure if I could run any code in NAV to Add the User correctly. Then I remembered using the code from 'Add me as Administrator'.

2. Modifying 'Add me as Administrator' for the first user in NAVISION:

In NAV / Business Central if there are no users present, the button 'Add me as Administrator' is enabled.
This button will help you create a SUPER User.
I checked the code behind the button and found there is a codeunit 9000 - Users Create Super User that has a check that if Users are EMPTY then only User is created. 

I had to disable the check and run the codeunit.

Code commented to disable User Check

This will create the Windows User with SUPER Permission.

A new Administrator user created with SUPER Permission

Conclusion:

This is not the prescribed way by Microsoft and only works on NAV and Business Central On-Premise.

This was originally posted here.

Comments

*This post is locked for comments