Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

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

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at
    RE: Which SQL table are user roles in?

    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.

  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    2,545 on at
    RE: Which SQL table are user roles in?

    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.

  • Dynamics365 Rocker Profile Picture
    7,755 on at
    RE: Which SQL table are user roles in?

    Check if you find filtered view with same name.

  • Community Member Profile Picture
    on at
    RE: Which SQL table are user roles in?

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

  • Community Member Profile Picture
    on at
    RE: Which SQL table are user roles in?

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

  • Community Member Profile Picture
    on at
    RE: Which SQL table are user roles in?

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

  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    2,545 on at
    RE: Which SQL table are user roles in?

    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.

  • Suggested answer
    Abhishek Gupta Profile Picture
    2,003 on at
    RE: Which SQL table are user roles in?

    Hi

    Check select * from RoleBase. Entity name is RoleBase.

    Thank you

    Abhishek

    If found useful, please mark the answer as verified

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    7,755 on at
    RE: Which SQL table are user roles in?

    SytemUserRole or UserRole.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
dkrishna Profile Picture

dkrishna 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans