Error message when you log on to a Microsoft Dynamics AX 4.0 client: "You are not a recognized user of Microsoft Dynamics AX"

When you log on to a Microsoft Dynamics AX 4.0 client after you restore a database, you receive the following error message:
You are not a recognized user of Microsoft Dynamics AX. Contact your system administrator for help.
This problem occurs if you restore a Microsoft Dynamics AX 4.0 environment in a different Active Directory directory service environment.


This problem occurs when one or more of the following conditions are true:
  • The security identifier (SID) is incorrect.
  • The network alias is incorrect.
  • The network domain is incorrect
Resolution
To resolve this problem, run the following script in SQL Query Analyzer after you restore the database.

Note You must obtain a SID in the current Microsoft Dynamics AX 4.0 environment.
--Extract the user's SID from the current installation to update the restored database.
select id, SID, Networkdomain, networkalias from userinfo where Id = 'admin'-- networkalias = '<UserAlias>'
To extract the SID of a specific user use the following command in command prompt:
" wmic path win32_useraccount where name="<username>" get sid
SID "

--Use the extracted information to update the restored dataset with the domain information for the admin account.
update userinfo set 
SID='<SID>', 
Networkdomain ='<NetworkDomain>',
networkalias ='<UserAlias>'
where id = 'admin'

Notes
  • The <SID> placeholder represents the actual SID. The SID may resemble the following:
    S-1-5-21-124525095-708298756-1543119021-161351
  • The <NetworkDomain> placeholder represents the actual network domain.
  • The <UserAlias> placeholder represents the actual network alias.

Comments

Popular posts from this blog

D365: SSRS Report Development/ Customization

D365: X++ code to add custom lookup on worker to show specific workers team workers only