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)

[SOLVED] How to assing admin roles to a user from within the database?

(0) ShareShare
ReportReport
Posted on by

Hi,

We have Dynamics 365 Version 1612 on premises. My CRM manager left some time ago and we have have found that nobody in the company can grant login access to new users or do some other admin tasks, since nobody has the credentials required. I do, however, have access to the database where all the info is stored and queried this:

select * from dbo.SystemUserBase

in order to see all my users. Now, what I would like to know is where and how to assign myself as CRM admin to manage my users.

Thank you!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    This is unsupported but here is what you can do:

    declare @RoleId uniqueidentifier

    Select @RoleId = RoleId From Role Where Name = 'System Administrator'

    Insert Into SystemUserRoles(systemuserroleid, systemuserid, roleid)

    Values (newid(), dbo.GetUserId(),dbo.fn_FindUserGuid(), RoleId)

    Take a backup before you will do that.

  • Suggested answer
    Mahadeo Matre Profile Picture
    17,021 on at

    Instead of doing something from database.. can you or anyone able to reset password of CRM Manager account. Once password reset, you can able to login with CRM manager account and assign some other user as System Admin and then you can able to add new users.

    I think this is the right way.. Using Database it will be very tricky and you might need to insert records into multiple tables

  • Verified answer
    Alexandr J.  Profile Picture
    246 on at

    Hi Cesar,

    try to check this topic:

    https://community.dynamics.com/crm/b/manojbatchumicrosoftdynamicscrmblog/archive/2015/09/15/crm-and-sql-tip-01-how-to-find-out-the-security-roles-assigned-to-the-user

    Otherwise if nobody can't help you before i can try to find it, but my version is CRM 2016 8.0.1.79. I had a problem with creating new users in CRM so i already succesfully tried to create new user within SQL, but i can in this case assign role later in CRM.

    Kind regards,

    Alex

  • Alexandr J.  Profile Picture
    246 on at

    Sorry i have non-refreshed page from yesterday so i didn't saw any answers before i wrote :X :)

  • Community Member Profile Picture
    on at

    If someone could reset... But that was precisely the problem.

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