Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Management Reporter - adding Remote AD users crashes MR Designer

Posted on by 394

Running GP2015 - MR CU 14

When I add an AD user from a remote, trusted domain, report designer crashes:

Application: ReportDesigner.exe

Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.COMException
Stack:
at Microsoft.Dynamics.Performance.Reporting.ReportDesigner.ReportDesignerMain.Main(System.String[])

It also displays a message box:

Logon failure: unknown user name or bad password

Has anyone seen this issue before?

Thanks,

Steven Vallarian

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Management Reporter - adding Remote AD users crashes MR Designer

    Thank you very much for the quick response.

  • Steven Vallarian Profile Picture
    Steven Vallarian 394 on at
    RE: Management Reporter - adding Remote AD users crashes MR Designer

    Powershell script, AddMRUsers_CU14.ps1

    #new guid for each user

    clear

    $usersList =Get-Content "C:\Users\administrator.CONTOSO\Desktop\userslist.txt"

    $MRDBName="ManagementReporter"

    $MRServerName="MRSERVER2012"

    function Call-ADO

    {

    param(

    [string]$cmd,

    $SQLNamePlusInstance = ".",

    [string]$databasename

    )

    $SqlCmd = New-Object System.Data.SqlClient.SqlCommand

    $Error.Clear()

    $SqlConnection = New-Object System.Data.SqlClient.SqlConnection

    $SqlConnection.ConnectionString = 'Server=' + $SQLNamePlusInstance + ';Persist Security Info=False;Integrated Security=SSPI' + ';DataBase=' + $databasename

    $SqlCmd.Connection = $SqlConnection

    $SqlCmd.CommandText = $cmd

    $SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter

    $SqlAdapter.SelectCommand = $SqlCmd

    $DataSet = New-Object System.Data.DataSet

    $RowCount = $SqlAdapter.Fill($DataSet)

    $SqlConnection.Close()

    if ($Error.Count -gt 0){

    $Error

    }

    else

    {

    return $DataSet

    }

    }

    foreach( $u in $usersList)

    {

    $firstCommaIndex =$u.IndexOf(',')

    $fullName = $u.Substring(0,$firstCommaIndex).Trim()

    $secondCommaIndex = $u.IndexOf(',',($firstCommaIndex+1))

    $domainName = $u.Substring(($firstCommaIndex+1),($secondCommaIndex-$firstCommaIndex-1)).Trim()

    $thirdCommaIndex = $u.IndexOf(',',($secondCommaIndex+1))

    $role = $u.Substring($secondCommaIndex+1).Trim()

    $userGUID= [System.Guid]::NewGuid().ToString().ToUpper()

    $SecurityPrincipalInsert = "insert into reporting.SecurityPrincipal values ('" + $userGUID + "', '"+$domainName +"', '',0,0)"

    $SecurityUserInsert1 = "insert into reporting.SecurityUser values('"+$userGUID + "','"+$fullName+"',"

    $objUser = New-Object System.Security.Principal.NTAccount($domainName)

    $strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier])

    $usersSID = $strSID.Value

    $roleID = 0

    $d = Get-Date

    switch ($role)

    {

    'Administrator' { $roleID = 5 }

    'Designer' { $roleID = 4 }

    'Generator' { $roleID = 3 }

    'Viewer' { $roleID = 2 }

    default { $roleID = 5 }

    }

    $SecurityUserInsert2 = "$roleID, '',0x,0x,'"+$usersSID+"','',0,'"+ $d.ToShortDateString() + "','9999-12-31', 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL)"

    $SecurityUserInsert = $SecurityUserInsert1 + $SecurityUserInsert2

    $Error.Clear()

    $v = Call-ADO $SecurityPrincipalInsert $MRServerName $MRDBName

    $v = Call-ADO $SecurityUserInsert $MRServerName $MRDBName

    if($Error.Count -gt 0)

    {

    Write-Host $domainName " insert failed"

    $Error

    }

    else

    {

    Write-Host $domainName " insert successful"

    }

    #$SecurityPrincipalInsert

    #$SecurityUserInsert

    }

  • Suggested answer
    Steven Vallarian Profile Picture
    Steven Vallarian 394 on at
    RE: Management Reporter - adding Remote AD users crashes MR Designer

    1. Create a UsersList.txt file with your list of users to be added:

     

         Text file format:

    • Each user should have their own line
    • <Full name>, <domain\user>, <MR Role>

     

    Ex:

     

    Tom Paul, contoso\tpaul, Administrator

    Sam Smith, contoso\sasmith, Designer

    Rob Johnson, contoso\rjohn, Generator

    Greg Michaels, contoso\gmichaels, Viewer

     

    2. In the PowerShell script, update the folder path in this line so it knows where to find your text file:

     

    $usersList = Get-Content "c:\users\administrator\desktop\UsersList.txt"

     

     

    3. Update MR database and MR server references in the PowerShell script:

     

    • In the PowerShell script, update the $MRDBName to be your Management Reporter SQL database:

     

    $MRDBName="ManagementReporter"

     

    • In the PowerShell script, update the $MRServerName to be the server where your Management Reporter database resides:

     

    $MRServerName="DAX2012"  

     

    4. Make a backup of your ManagementReporter database.

    5. Run the PowerShell script.

    6. Confirm the users have been successfully added when looking under the Security area in Report Designer.

    7. Confirm that the users can login successfully.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Management Reporter - adding Remote AD users crashes MR Designer

    Are you able to provide that script?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Management Reporter - adding Remote AD users crashes MR Designer

    can you post the script that fix your issue?

    thanks

    Mike

  • Verified answer
    Steven Vallarian Profile Picture
    Steven Vallarian 394 on at
    RE: Management Reporter - adding Remote AD users crashes MR Designer

    After opening a case with MS, this was found as Bug 352160, and fixed with a script from support.

    This problem only occurs on a one-way trust.

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans