The story goes, the system had only one user that was assigned the System Administrator Role, to avoid giving blanket rights to many in the organization.
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.
select * from SystemUserBase where FullName=’System Administrator’
From this query we was able to get the “Systemuserid” of 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”.
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.
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.
But now we do have the manage roles button to allow us to add this role back again