Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

SQL Script to Evaluate Management Reporter Security

Posted on by
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

  • Lyn Barr Profile Picture
    Lyn Barr on at
    RE: SQL Script to Evaluate Management Reporter Security

    Outstanding thanks Beat!

  • Suggested answer
    Beat Bucher  GP Geek  GPUG All Star Profile Picture
    Beat Bucher GP Gee... 28,021 Super User 2024 Season 1 on at
    RE: SQL Script to Evaluate Management Reporter Security

    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

  • RE: SQL Script to Evaluate Management Reporter Security

    Thank you for sharing!

  • Verified answer
    Lyn Barr Profile Picture
    Lyn Barr on at
    RE: SQL Script to Evaluate Management Reporter Security

    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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans