This event is executed if an Ajax callback returns with a 401 status code.
If the server sends back a '401' status code in the response, the securityNotAuthenticated event will fire. To use this event, you must set the Security permissions denied action property in the Other section of the UX properties to Fire client-side security events.
You can manually set the status code in an Ajax response (for example, if you want to test the events), by setting the Context.Response.StatusCode property in the Xbasic function that handles the Ajax callback. See How to Return Status Codes from Ajax Callbacks for more information.