Unfortunately, this user (the only System Administrator) goes ahead and takes the role off their user. Cool… Now we are left with no System administrator user in our CRM system.
System Administrator happens to be the only user with the privileges to assign roles to a user in CRM.
With no System administrator in the entire system, it was as if we were locked out as no one had any rights to make anybody the system administrator.
The only workaround, though unsupported, worked for us is to make a couple of updates to the tables directly from the backend.
select * from SystemUserBase where FullName='System Administrator'
From this query we was able to get the “Systemuserid” of the “System Administrator”
select * from SystemUserBase where FullName='System Administrator'
From this query we was able to get the “Systemuserid” of the “System Administrator”
Now use this “systemuserid” in the below query:
select * from SystemUserRoles where SystemUserId='3B0574CE-A5EE-DD11-BDF0-0003FFEB167C'
From the above query we got the total roles associated with the “System administrator”.
select * from SystemUserRoles where SystemUserId='3B0574CE-A5EE-DD11-BDF0-0003FFEB167C'
From the above query we got the total roles associated with the “System administrator”.
Now find the roleid of “System Administrator” role by the below query.
select * from RoleBase where Name='System Administrator'
Now we have to update the “systemuserroletable”. We will update the roleid of the first row to roleid of “System Administrator” role.
select * from RoleBase where Name='System Administrator'
Now we have to update the “systemuserroletable”. We will update the roleid of the first row to roleid of “System Administrator” role.
update SystemUserRoles set RoleId='B6F673CE-A5EE-DD11-BDF0-0003FFEB167C' where SystemUserId='3B0574CE-A5EE-DD11-BDF0-0003FFEB167C'
and SystemUserRoleId='01ACF23C-D23C-DF11-A664-0003FFD1167C' and RoleId='6D0274CE-A5EE-DD11-BDF0-0003FFEB167C'
Do the “IISRESET”
Now the “System Administrator” has the “System administrator” role.
and SystemUserRoleId='01ACF23C-D23C-DF11-A664-0003FFD1167C' and RoleId='6D0274CE-A5EE-DD11-BDF0-0003FFEB167C'
Do the “IISRESET”
Now the “System Administrator” has the “System administrator” role.