Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

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

Posted on by Microsoft Employee

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to assing admin roles to a user from within the database?

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

  • Alexandr J.  Profile Picture
    Alexandr J. 246 on at
    RE: How to assing admin roles to a user from within the database?

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

  • Verified answer
    Alexandr J.  Profile Picture
    Alexandr J. 246 on at
    RE: How to assing admin roles to a user from within the database?

    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

  • Suggested answer
    Mahadeo Matre Profile Picture
    Mahadeo Matre 17,021 on at
    RE: How to assing admin roles to a user from within the database?

    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
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: How to assing admin roles to a user from within the database?

    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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans