How to add Admin role to user from SQL in D365FO

 How to add Admin role to user from SQL in D365FO


In SecurityRole table we will find all roles.

Execute the below statement to know the system admin role Recid.

Select Recid,* from SecurityRole where NAME like 'sys%'


Insert the data into SECURITYUSERROLE  table with username and role recid. Execute the below statement.

insert into SECURITYUSERROLE (USER_, SECURITYROLE,ASSIGNMENTSTATUS,ASSIGNMENTMODE)
values('vinay', 235,1,1)

If you want to update you can use the below statement.

update SECURITYUSERROLE
set SECURITYROLE = 235 where  USER_ = 'Vinay'
reference :- Click here

Comments

Popular posts from this blog

Customization on Sales invoice Report in D365 F&O

46) D365 FO: SHAREPOINT FILE UPLOAD USING X++

75) COC - Create a coc of the table modified method