Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
The below SQL query is useful to find out the Security Roles assigned to the users from backend by querying the Organization_MSCRM database in SQL Server.
select role.name as 'Role Name',
cast(systemuser.systemuserid as nvarchar(50)) as 'System User Id',
fullname as 'Full Name',
domainname as 'Domain Name',
firstname as 'First Name',
lastname as 'Last Name',
internalemailaddress as 'Mail ID',
isdisabledname as 'Status',systemuser.businessunitidname as 'Business Unit', systemuser.businessunitid as 'Business Unit ID'
from Filteredsystemuser AS systemuser
LEFT JOIN FilteredSystemUserRoles AS userroles on systemuser.systemuserid = userroles.systemuserid
LEFT JOIN FilteredRole AS role on role.roleid = userroles.roleid
where domainname is not null
This shall return only the roles which are directly associated to the user. slightly modified the query to retrieve the role which are inherited by the team membership.
This returns the same output of Xrm.Page.context.getUserRoles()
INNER JOIN FilteredTeamMembership AS teammember on teammember.systemuserid=systemuser.systemuserid
INNER JOIN FilteredTeamRoles AS teamroles on teamroles.teamid=teammember.teamid
INNER JOIN FilteredRole AS role on role.roleid = teamroles.roleid
order by domainname
Business Applications communities