Posts

Showing posts from June, 2023

SQL script to retrieve the list of active users with license details D365 FnO

  Hi guys, I am writing this blog to share the information regarding active users license details in D365 FnO.  Below is the SQL script that will fetch list of active users, roles and their license details. ============================================================== Select userId.ID as "User id",     userId.NAME as "User name",     securityRole.NAME AS "Role name",     securityRole.description AS "Role description",     ISNULL(internalOrganization.NAME,'All') as "Legal entity",     (CASE securityRole.USERLICENSETYPE     WHEN 4 Then 'Operations'     WHEN 6 Then 'Team Members'     WHEN 7 Then 'Activity'     Else 'Unknown' end) as "License type"     from userInfo userid     inner JOIN SECURITYUSERROLE UserRole     on UserRole.USER_ = userid.ID     inner JOIN AXDB.dbo.SECURITYROLE securityRole     on securityRole.RecId = UserRole.SecurityRo...