Create a view via agent on Server for a non-designer

I have an agent that creates a view on the server as a “custom” view (sets selection criteria to User Name) via LS but when run by a user it fails with:

Error : 4000

You are not authorized to perform that operation.

I have set the agent security to run on behalf of an unrestricted user. The agent is called from an action on an outline.

Any idea’s or am I missing something important?

Thanks!

Subject: Nevermind

The Run on Behalf only works for scheduled agents so I have the first agent calling the second agent and passing the needed information.