Troubleshooting Security Errors

This is just a reminder of some steps that can be taken to find out what window or report a user is missing permissions to, and what task/role can be used to grant them. Especially useful for things that don’t always come up on the screen even when you do have the permissions already…

 

Open the DEXSQL.log file, and search for lines that contain zDP_SY10000SS_1…

 

/*  Date: 01/22/2016  Time: 14:34:42
stmt(42432920):*/
{ CALL DYNAMICS.dbo.zDP_SY10000SS_1 ( ‘gbessotest’, 2, 0, 1409, 2 ) }

 

The values being passed are:  ( ‘<user id>’, <company id>, <dictionary id>, <security id>, <security resource type> )

 

Then run the following query with the security ID and security resource type values entered in…

SELECT * FROM DYNAMICS..SY09400
WHERE DICTID = 0
AND SECURITYID = 1409
AND SECRESTYPE = 2

 

 

Then you can run the following to find out where that elusive window or report is granted permissions from…

SELECT ISNULL(A.SECURITYROLEID,”) AS SECURITYROLEID, ISNULL(M.SECURITYROLENAME,”) AS SECURITYROLENAME, -ISNULL(M.SECURITYROLEDESC,”) AS SECURITYROLEDESC,
ISNULL(O.SECURITYTASKID,”) AS SECURITYTASKID, ISNULL(T.SECURITYTASKNAME,”) AS SECURITYTASKNAME, -ISNULL(T.SECURITYTASKDESC,”) AS SECURITYTASKDESC,
R.PRODNAME, R.TYPESTR, R.DSPLNAME, R.RESTECHNAME, R.DICTID, R.SECRESTYPE, R.SECURITYID
FROM DYNAMICS.dbo.SY09400 R
FULL JOIN DYNAMICS.dbo.SY10700 O ON R.DICTID = O.DICTID AND O.SECRESTYPE = R.SECRESTYPE AND O.SECURITYID = R.SECURITYID
FULL JOIN DYNAMICS.dbo.SY09000 T ON T.SECURITYTASKID = O.SECURITYTASKID
FULL JOIN DYNAMICS.dbo.SY10600 A ON A.SECURITYTASKID = T.SECURITYTASKID
FULL JOIN DYNAMICS.dbo.SY09100 M ON M.SECURITYROLEID = A.SECURITYROLEID
WHERE R.DSPLNAME = ‘Fiscal Periods’

 

I found this information from the following useful websites:

How to create a DEXSQL.log file to troubleshoot error messages in Microsoft Dynamics GP…
https://support.microsoft.com/en-us/kb/850996

 

Using DEXSQL.LOG to Track Security Issues…
https://community.dynamics.com/gp/b/dynamicsgpessentials/archive/2015/02/07/using-dexsql-log-to-track-security-issues-not-privileged-to-run-this-report

 

How to Identify Security Tasks and Roles with a Specific Window or Report…
http://blogs.msdn.com/b/developingfordynamicsgp/archive/2008/11/12/how-to-identify-the-security-tasks-and-security-roles-associated-with-a-specific-window-or-report.aspx