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)
Suggested Answer

Which SQL table are user roles in?

(0) ShareShare
ReportReport
Posted on by

I am using Skyvia to connect to Dynamics 365 and synchronize users and their roles with a MySQL database.

I can see in the SQL database for Dynamics that users data is within the 'systemuser' table. 

Can someone tell me which table I get the users roles from please? Within CRM I can see users and their relevant roles/groups but can't see where this is held within SQL.

Thank you in advance!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Dynamics365 Rocker Profile Picture
    7,755 on at

    SytemUserRole or UserRole.

  • Suggested answer
    Abhishek Gupta Profile Picture
    2,003 on at

    Hi

    Check select * from RoleBase. Entity name is RoleBase.

    Thank you

    Abhishek

    If found useful, please mark the answer as verified

  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    2,545 on at

    Hi,

    There are 3 tables: 

    1. Systemuser- user records and related info is stored

    2. role - roles with access rights and privileges

    3. systemuserroles - this contains information of users with the assigned roles

    You can get the information in SQL under filteredviews with "filtered" prefix as well as under tables with the above names.

    Please mark this answer as verified, if it has resolved your question.

  • Community Member Profile Picture
    on at

    Thanks, I can't find either of these in the Dynamics365 Online SQL tables though.

  • Community Member Profile Picture
    on at

    Thanks, I can't find the RoleBase table in the SQL database

  • Community Member Profile Picture
    on at

    Thanks for the reply. I can find the first 2 in the SQL database, but not the 3rd "systemuserroles"

  • Dynamics365 Rocker Profile Picture
    7,755 on at

    Check if you find filtered view with same name.

  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    2,545 on at

    systemuserroles is a filteredview.

    You can get the information in SQL under filteredviews with "filtered" prefix as well as under tables with the above names.

    If found useful, please mark this answer as verified.

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    dbo.SystemUserRoles is the intermediate table in CRM SQL database that holds the roles associated with users.

    ScreenClip-_5B00_119_5D00_.png

    If the table is not their in your MySQL DB, it could that you have to re-configure the tool to Sync this table as well. Or the tool might be creating the intermediate table with different name.  If you check the columns of all the tables, you will be able to find out.

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