0

When running a Shiny app inside a Databricks notebook as described here, is it possible to get the Databricks user id of the app user?

(Not the id of the user running the notebook but the id of the user of the Shiny app.)

Nairolf
  • 2,418
  • 20
  • 34
  • Is clientData of any help here? https://shiny.rstudio.com/articles/client-data.html – Roman Luštrik Jan 25 '22 at 09:28
  • Thanks for the hint. The user name is not readily available form the client data. If we could give the users a link that then calls the app with `app_url/?user_name`, this could work. But I don't know how to redirect users to a url containing their user id on Databricks. – Nairolf Jan 25 '22 at 09:58
  • You could use `updateQueryString()` to redirect the users. Please see [this](https://stackoverflow.com/questions/70080803/uri-routing-for-shinydashboard-using-shiny-router/70093686#70093686) or [this](https://github.com/rstudio/shiny/issues/3546#issuecomment-990968403) for an example. – ismirsehregal Jan 25 '22 at 10:01
  • Thanks for the hint. But the problem to get the user id into the url is still not solved. Or do I miss something? – Nairolf Jan 25 '22 at 12:37
  • yes, and how do I infer the user name? I don't want to give a unique url to each user. Ideally, I would have the same link for all users. The user logs into azure and then the link is modified to link/?username. Or something like that. – Nairolf Jan 25 '22 at 13:26

0 Answers0