Virtual Agent runs scripts as User
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2022 08:19 PM
When I'm running a script action in a VA topic, the script does not run as admin.
For instance, in one of my scripts I'm referring to the Date Of Birth (DOB) field of a user to conditionally show or hide a bot response for users older than 40. However, the DOB field is restricted via ACLs to everyone except admins (yes, you cannot even view your own DOB if you are not an admin). So the flow behaviour here is erratic as the Flow execution runs as the user who triggered it, not as an Administrator.
Ideally, if Flow Designer is allowed to run as User or as Administrator, VA topic flows should be allowed to do so, too
What can I do to fix this, or circumvent this issue? Bear in mind that I'm not displaying the DOB to the user anywhere - only using it to conditionally hide a bot response block.
- Labels:
-
Virtual Agent

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 05:47 AM
Are you getting an error? Any chance it's the script and not the ACL?
I've never run into issue running scripts from the VA - they always run with system/admin privileges and bypass ACLs.
Are you using GlideRecord or GlideRecordSecure? If you want to bypass ACLs, you have to use the former.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 06:11 AM - edited 12-16-2022 06:32 AM
It simply says "I've run into techincal issues....". I'm using GlideRecord so that's not the issue. And the script is running for an admin, so I feel the script is correct too.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 08:54 AM
Anything in the log?
Definitely bizarre to hear that it runs (presumably in VA, right??) as an admin user but not as a non-admin user. I'm not sure what else could affect it then. Maybe it's like a data policy and data policies are enforced differently? I dunno...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 10:47 AM
No it's definitely ACL and not data policy because I've checked with other fields.
Now I'm not very good at interpreting logs:
But here are the snapshots for that timeframe when I tried this again.
1)
2)
Anything you can spot that may serve as a clue?