cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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
Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.