Monday, May 11, 2026

Assign roles through ssms in d365fo

 Step1;- Here my Role name I want to assign is System admin

SELECT  RecId,* FROM SecurityRole WHERE Name = 'System administrator';

step 2:- User name here is sai  and pass recid from above to below query

insert into SECURITYUSERROLE (USER_, SECURITYROLE, ASSIGNMENTSTATUS, ASSIGNMENTMODE)
VALUES ('sai', 171,1,1);


Thats it!! refresh and check


For deleting of roles through SSMS

Step1:-SELECT  RecId,* FROM SecurityRole WHERE Name = 'System administrator';

pass recid from above to below query

Step 2:-DELETE FROM SECURITYUSERROLE WHERE USER_='sai'and SECURITYROLE=171;


Thank you!!

Assign roles through ssms in d365fo

 Step1;- Here my Role name I want to assign is System admin SELECT  RecId,* FROM SecurityRole WHERE Name = 'System administrator'; s...