web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)
Answered

Accidentally system administrator privilege has removed

(0) ShareShare
ReportReport
Posted on by 815

Hello,

My login and there was another login has System Admin & System Customiser security role privilege. When i changed Business unit, unfortunately I am unable to login and even other tool.

How to restore login privilege ?

8737.User-Setting.PNG  

Regards

Faisal

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    You cannot restore role if these are changed. You need to ask someone else to assign you system admin role again.

    Hope this helps.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Sayed ,

    Its default behavior , changing business unit for any user will be removed security role. So you need to login CRM with another System Admin user and assign the security role to you .

  • Syed_Faisal Profile Picture
    815 on at

    Thanks for answers, unfortunately, there is no other user has access and it was happen on test server.

  • Suggested answer
    Emre GULCAN Profile Picture
    2,379 on at

    Hi Syed,

    I faced same issue last year, one of BA inside my team changed only one crmadmin's role as sales people. ı tried to login with XrmToolbox with my crmadmin account (old admin, new salesperson) and use "User Roles Manager" plugin and try to change my crmadmin role to "system administrator" and it worked (it was miracle :))

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Sayed ,

    I can see you are using on-premise , so you can directly update database table.

    Below is the Query I prepared for you, you need to just execute in organization database after replace the first name where I have given my name.

    Declare @RoleID varchar(50)
    Declare @RoleName varchar(50)
    Declare @BuisinessunitName varchar(100)
    Declare @UserId varchar(50)
    select  @BuisinessunitName =BusinessUnitIdName,@UserId=SystemUserId from SystemUser where  FirstName ='gautam'
    select  @RoleID=RoleId,@RoleName=Name from Role  where Name= 'System Administrator' and BusinessUnitIdName = @BuisinessunitName
    update SystemUserRoles set RoleId=@RoleID where SystemUserId =@UserId
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    First thing this is a default behaviour, Second there should be another admin role otherwise CRM won't allow to remove the admin security role normally, so check who is other user and he can reassign your role back.

  • Syed_Faisal Profile Picture
    815 on at

    Hi Gowtham,

    Thanks for the reply, as instructed i did same. After run the Query i got this message in SQL "(0 rows affected)"

    When try to login to CRM, Getting this below error.

    " An error has occurred.

    Try this action again. If the problem continues, check the Microsoft Dynamics 365 Community for solutions or contact your organization's Microsoft Dynamics 365 Administrator. Finally, you can contact Microsoft Support.

    I also have rebooted the system and still it is same.

  • Syed_Faisal Profile Picture
    815 on at

    Hi Emre,

    I tried with XRMToolbox but no luck for me.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Sayed,

    Run the query again and check userid you are getting or not.

    Declare @RoleID varchar(50)

    Declare @RoleName varchar(50)

    Declare @BuisinessunitName varchar(100)

    Declare @UserId varchar(50)

    select  @BuisinessunitName =BusinessUnitIdName,@UserId=SystemUserId from SystemUser where  FirstName ='gautam'

    select  @RoleID=RoleId,@RoleName=Name from Role  where Name= 'System Administrator' and BusinessUnitIdName = @BuisinessunitName

    Select @UserId, @RoleID

    update SystemUserRoles set RoleId=@RoleID where SystemUserId =@UserId

    Check the firstname you are giving correctly.

  • Syed_Faisal Profile Picture
    815 on at

    Hi Goutam,

    Thanks for the reply, i run the query. PF screenshot.

    8510.sql.png

    Still getting same error.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans