After restore the AX Database from other environment, may experience can’t log into AX issue. Run the follow SQL Query against original database and new database to update the user information.
Existing DB
select SID, NETWORKDOMAIN, NETWORKALIAS, * from UserInfo where Id = ‘Admin’
select SID, NETWORKDOMAIN, NETWORKALIAS, * from UserInfo where Id = ‘Admin’
Restored DB
update userinfo
set
networkdomain = ‘YourDomainName’,
networkalias = ‘Administrator’,
SID = ‘S-1-5-21-2749077036-747833739-1932402455-500’
update userinfo
set
networkdomain = ‘YourDomainName’,
networkalias = ‘Administrator’,
SID = ‘S-1-5-21-2749077036-747833739-1932402455-500’
where ID = ‘Admin’