Risk Assessment not Authorized

David_Pickering
ServiceNow Employee
ServiceNow Employee

Getting an unusual error.

I have several Risk Assessments that are defined and I know work another instance.

However in this particular instance when I click on Fill out Risk Assessment in the Change, it gives me an error saying "You are not authorized for this assessment"

I cannot work out why this is not allowing me to execute it. Even Admin cannot run any assessments.

Thanks for any help.

14 REPLIES 14

andrewmaryville
Kilo Contributor

That is the catchall error thrown by the survey_take UI page, which generates those assessments. I would start by looking there.
Have you made any modifications to that page?


mdwallick
Giga Contributor

I haven't figured out how to fix it yet, but I believe the root cause is due to this query block near the top of the survey_take UI page:

// ADDED FOR APM Aug 2011
// Can check of invalid user
// Can check for completed surveys
as = new GlideRecord('assessment');
as.addQuery('document_table', '$[sysparm_document_table]');
as.addQuery('document_id', '$[sysparm_document_id]');
as.addEncodedQuery('master.name=' + jelly.sysparm_survey);
as.query();
var userAllowed = true;
if (as.next()){
userAllowed = AssessmentUtils.isUserAllowed(as, gs.getUserID());
}

There is no such table "assessment" which causes the problem. Commenting out the query block above is a temporary workaround.

I'm on glide-october2011-preview2-08-03-2011.


Contact support. This is a known issue and they should be able to supply a fix.


David_Pickering
ServiceNow Employee
ServiceNow Employee

Thanks for the responses. It is a issue with preview 2. I have applied a fix and it now works fine.