Step 1: Run CMD as administrator and type whoami /all | more, it will display your name and the SID. Copy out the SID.
Step 2: Navigate to MSSQL Management Studio , locate the baseline database for AX and look for table called “dbo.userinfo”, update the table with the necessary infos including the sid or you can use the query below, modify to suit your needs.
update userinfo set
networkdomain = ‘DomainName’,
networkalias = ‘NetworkAlias’,
name = ‘sam’,
SID = ‘S-1-5-21-XXXXXXXX-3956443045-XXXXXX-1001’
where ID = ‘Admin’.
I had this issue and was able to resolve it after going through some processes.