Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to fix CrossScopeAccessNotAllowedException for Virtual Agent API?

Lokesh14
Giga Contributor

I am getting 2 responses from Virtual Agent API and I see below error in Logs. I followed all the steps from this page https://docs.servicenow.com/bundle/paris-performance-analytics-and-reporting/page/administer/virtual-agent/concept/virtual-agent-api.html

org.mozilla.javascript.EcmaError: Cannot find function getMessage in object JavaException: com.glide.script.fencing.CrossScopeAccessNotAllowedException: Access to ScriptableRESTResponse.getBody from scope sn_va_as_service not allowed.

Can someone please tell me what I need to do to fix this? I have not added anything additional other than the instructions in the link.

1 ACCEPTED SOLUTION

Ct111
Tera Sage

My inputs on below error

com.glide.script.fencing.CrossScopeAccessNotAllowedException:

You need to create record in cross scope table so that access is allowed . Set the status of the record to allowed 

 

Example for reference :

EXAMPLE1 for reference

 

For information about it read this doc, you can search cross scope in filter navigator

CRoss scope Record

 

 

View solution in original post

7 REPLIES 7

This are all the errors I see in Logs, when I send a REST request.

REST request:

find_real_file.png

Errors:

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

 

Can you please tell me what am I doing wrong here?

Hi,

I couldn't check in my instance.

But I believe you will have to create cross scope application record for allowing it

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

 

I was able to fix the errors by creating cross scope application record.

 

Thanks 🙂