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 GP (Archived)

SQL Script to Evaluate Management Reporter Security

(0) ShareShare
ReportReport
Posted on by 1
I recently had a client, who is publicly traded, who needed a report on the security configured within Management Reporter. To that end, I developed these SQL scripts which provided them with the information to satisfy their auditors. Hopefully these will prove useful to someone else, which is why I am posting them here! --MR Security Script #1 --MR UserNames, along with DomainNames, MR Role assignment and MR Group assignment select a.UserName, b.[Name] as DomainName, case a.RoleType when 5 then 'Admin' when 4 then 'Designer' when 3 then 'Generator' end RoleDescr, d.[Name] as GroupID, d.[Description] as GroupName from SecurityUser a (nolock) join SecurityPrincipal b (nolock) on a.UserID = B.ID left join SecurityGroupUser c (nolock) on a.UserID = c.UserID left join SecurityPrincipal d (nolock) on c.GroupID = d.ID order by d.[Description], a.RoleType --MR Security Script #2 --Company Access as assigned by Group select c.[Name] as GroupID, c.[Description] as GroupName, b.Code as CompanyID, b.[Name] as CompanyName from SecurityCompanyPermission a (nolock) join ControlCompany b (nolock) on a.CompanyID = b.[ID] left join SecurityPrincipal c (nolock) on a.PrincipalID = c.[ID] order by c.[Name], b.Code

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Lyn Barr Profile Picture
    1 on at

    Well, that didn't show up so well!  Sorry that I messed up the layout.  However, rest assured that the scripts still work, and are valid.

    These scripts worked for me.

  • Melissa Sandrovich Profile Picture
    on at

    Thank you for sharing!

  • Suggested answer
    Beat Bucher  GP Geek  GPUG All Star Profile Picture
    28,058 Moderator on at

    Hi Lyn,

    I was looking for something about MR 2012 and came accros your post.  Since the cotent is already over 2 years old, I adjusted the code for the latest MR2012 CU15 and reformated it :

    --MR Security Script #1

    --MR UserNames, along with DomainNames, MR Role assignment and MR Group assignment
    SELECT a.UserName
    ,b.[Name] AS DomainName
       ,CASE a.RoleType
    WHEN 5

    THEN 'Admin'

    WHEN 4

    THEN 'Designer'

    WHEN 3

    THEN 'Generator'

    END RoleDescr

    ,d.[Name] AS GroupID

    ,d.[Description] AS GroupName

    FROM [Reporting].[SecurityUser] a(NOLOCK)

    JOIN [Reporting].SecurityPrincipal b(NOLOCK) ON a.UserID = B.ID

    LEFT JOIN Reporting.SecurityGroupUser c(NOLOCK) ON a.UserID = c.UserID

    LEFT JOIN Reporting.SecurityPrincipal d(NOLOCK) ON c.GroupID = d.ID

    ORDER BY d.[Description]

    ,a.RoleType

    --MR Security Script #2

    --Company Access as assigned by Group

    SELECT c.[Name] AS GroupID

    ,c.[Description] AS GroupName

    ,b.Code AS CompanyID

    ,b.[Name] AS CompanyName

    FROM Reporting.SecurityCompanyPermission a(NOLOCK)

    JOIN Reporting.ControlCompany b(NOLOCK) ON a.CompanyID = b.[ID]

    LEFT JOIN Reporting.SecurityPrincipal c(NOLOCK) ON a.PrincipalID = c.[ID]

    ORDER BY c.[Name]

    ,b.Code

  • Lyn Barr Profile Picture
    1 on at

    Outstanding thanks Beat!

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 GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans