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.


You can find a sample which utilizes an OAuth workflow to allow users to sign in and access secure content from ArcGIS Online/Portal here:

You can find an example for requesting a token from ArcGIS Server here:

  • Thanks John, I've gotten that far. What I want is to be able to access the data for plotting in D3 based on the username, or a process to get the username and extract the data from the service to run a script to create plots. – GISKid Jul 11 '17 at 1:19
  • okay. thats not a leaflet or esri leaflet question but the generic process is the same. you need to assist the user request a token and then you need to pass it through when making requests to query the data you intend on plotting. – John Gravois Jul 11 '17 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.