cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Using Azure Databricks to manage my R Shiny front-end, need to know the user via R session

dataslicer
Contributor

Using the Azure Databricks R Shiny example, I am easily able to instantiate a R Shiny web front session. The URL that is provided by Databricks provides the proxy session that allows my targeted audience to directly access my `R Shiny` app using that URL.

I want to obtain the user_id via that is currently accessing directly to my R Shiny web session context. How do I do that? Does Azure Databricks proxy wrapper (to my R Shiny web app) provides any authentication or authorization using the physical access token of that particular user?

Please don't get confused with the following, which promptly returns the user_id of my Databricks compute session that is hosting my R Shiny web app and that is not what I am after.

library(SparkR)
 
get_current_user <- SparkR::sql("SELECT current_user()")
user_df <- as.data.frame(get_current_user)
current_user <- user_df[1,1]
 
print(current_user)
# [1] "dbx_user@fqdn.com"
 
typeof(current_user)
# [1] "character"

0 REPLIES 0

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group