I'm currently using Esri Leaflet with authenticated user services. Authenticated services are set up and work fine for displaying geographic data after login, however, I want to create a dashboard and visualizations (mostly graphs) from the data in the SDE within our mapping platform. eg."Your trends over time vs all users trends over time". I can export the data as csvs from our database and use D3, however I'm really stuck on a more efficient way to do this using authenticated layers.
Is there a way to create visualizations while using an esri token to get the user-specific data? Additionally, I want to aggregate all data to display as well (from other users) but I am concerned about security. Eg. A graph of User A's submissions vs all submissions by all users (user b, user c) without user b and user c's data being exposed to user A.
I can't find any working examples of this. I'm mostly concerned about security I do not want our users to be able to see other user's data (unless aggregated).
I've seen one similar unanswered question at Seeking data visualization techniques for web maps using Esri and open source suites?. This question addresses the D3 aspects but not authentication or querying the data.